Re: Yet another "drop table vs delete" question
От | Christophe |
---|---|
Тема | Re: Yet another "drop table vs delete" question |
Дата | |
Msg-id | CC06391F-DE2B-423A-A724-25529D045C32@thebuild.com обсуждение исходный текст |
Ответ на | Re: Yet another "drop table vs delete" question (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Yet another "drop table vs delete" question
|
Список | 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 по дате отправления: