Re: Must be owner to truncate? - Mailing list pgsql-hackers

From Mike Mascari
Subject Re: Must be owner to truncate?
Date
Msg-id 42CFD586.5060003@mascari.com
Whole thread Raw
In response to Re: Must be owner to truncate?  (Stephen Frost <sfrost@snowman.net>)
Responses Re: Must be owner to truncate?  (Stephen Frost <sfrost@snowman.net>)
Re: Must be owner to truncate?  (Hannu Krosing <hannu@skype.net>)
List pgsql-hackers
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


pgsql-hackers by date:

Previous
From: Christopher Kings-Lynne
Date:
Subject: Re: Must be owner to truncate?
Next
From: Stephen Frost
Date:
Subject: Re: Must be owner to truncate?