Stephen Frost wrote:

delete from x;/truncate x;
  --> Creates a new, empty, file and makes it the 'current' file
  --> Marks the old file for deletion, but it is kept around for any
      transactions which were started before the truncate;
  --> New transactions use the empty file
  --> Once all transactions using the old file have completed, the old
      file can be deleted.
  --> Old transactions which insert rows would need to use the new file
      or scan the old file for rows which they added, I suppose.

And when the transaction that issued the TRUNCATE aborts after step 3, but newer transactions commit?

Mike Mascari

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to