Re: Must be owner to truncate?

From: Mike Mascari <mascarm(at)mascari(dot)com>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, andrew(at)supernews(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Must be owner to truncate?
Date: 2005-07-09 13:47:50
Message-ID: 42CFD586.5060003@mascari.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2005-07-09 13:57:52 Re: Must be owner to truncate?
Previous Message Christopher Kings-Lynne 2005-07-09 08:09:36 Re: Must be owner to truncate?