Re: Yet another "drop table vs delete" question - Mailing list pgsql-general

From Christophe
Subject Re: Yet another "drop table vs delete" question
Date
Msg-id CC06391F-DE2B-423A-A724-25529D045C32@thebuild.com
Whole thread Raw
In response to Re: Yet another "drop table vs delete" question  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Yet another "drop table vs delete" question
List pgsql-general
On Apr 21, 2009, at 1:36 PM, Tom Lane wrote:
> I was thinking of MVCC semantics, which is a different issue.

Indeed so, my error.  This is a bit of a drift off-topic, but
rereading the docs, I'm now having trouble visualizing the real-world
effect of the non-MVCC-safeness of TRUNCATE.  A transaction that
queries the table before the TRUNCATE is going to pick up an ACCESS
SHARED lock, which will prevent the TRUNCATE from running until it's
released.  The TRUNCATE will pick up an ACCESS EXCLUSIVE lock that
will block any subsequent queries until the transaction doing the
TRUNCATE commits.  I'm sure there is a scenario under which a separate
transaction could see non-MVCC behavior from TRUNCATE, but I'm having
trouble see what it is.

pgsql-general by date:

Previous
From: Chris Browne
Date:
Subject: Re: Yet another "drop table vs delete" question
Next
From: Jeff Davis
Date:
Subject: Re: Yet another "drop table vs delete" question