Re: locks in CREATE TRIGGER, ADD FK

Поиск
Список
Период
Сортировка
От Neil Conway
Тема Re: locks in CREATE TRIGGER, ADD FK
Дата
Msg-id 4240EFFD.4090805@samurai.com
обсуждение исходный текст
Ответ на Re: locks in CREATE TRIGGER, ADD FK  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: locks in CREATE TRIGGER, ADD FK  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: locks in CREATE TRIGGER, ADD FK  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane wrote:
> Utterly wrong.  When you commit you will physically drop the old table.
> If there is a SELECT running against the old table it will be quite
> unhappy after that.

How can we drop the file at commit, given that a serializable 
transaction's snapshot should still be able to see old relfilenode's 
content?

(If the serializable transaction has already acquired a read lock before 
the TRUNCATE begins, it will block the TRUNCATE -- but there is no 
guarantee that the operations will be ordered like that.)

-Neil


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: locks in CREATE TRIGGER, ADD FK
Следующее
От: Andrew - Supernews
Дата:
Сообщение: swapping relfilenodes (was: Re: locks in CREATE TRIGGER, ADD FK)