db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Matrigali <mikem_...@sbcglobal.net>
Subject Re: truncating a table vs online backup
Date Mon, 02 May 2011 21:20:46 GMT
Rick Hillegas wrote:
> According to the Admin Guide, uncommitted unlogged operations prevent 
> you from starting an online backup. These unlogged operations include 
> index creation and bulk import.
> An uncommitted TRUNCATE TABLE does not block online backup. Is that OK?
> Thanks,
> -Rick
I think it would be all right as the problem part of index creation and
bulk inport is the "insert" part of the operations not being logged.  In
all cases I believe the ddl/system catalog parts are logged. The 
"delete" part of truncate in this case can sort of be thought of as 
logged in that we save an old copy of the table so that the backout of
the uncommitted truncate can restore the table.

Logically truncate table should act as a drop table followed by a create
table.  These operations should be ok.

But would be best to confirm with a test.  Should at least log a JIRA
to add tests for at least the following:
o uncommitted truncate table followed by online backup and then access 
the backup copy and access the table.  should see the old data.
o uncommitred truncate table, followed by online backup that keeps logs,
   then commit the truncate, and then access the table in the backup.

View raw message