Search Postgresql Archives

Re: Yet another "drop table vs delete" question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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.

--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux