Re: Must be owner to truncate?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Must be owner to truncate?
Дата
Msg-id 4907.1120924115@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Must be owner to truncate?  (Stephen Frost <sfrost@snowman.net>)
Ответы Re: Must be owner to truncate?  ("Jim C. Nasby" <decibel@decibel.org>)
Список pgsql-hackers
Stephen Frost <sfrost@snowman.net> writes:
> * Mike Mascari (mascarm@mascari.com) wrote:
>> And when the transaction that issued the TRUNCATE aborts after step 3,
>> but newer transactions commit?

> The newer transactions would have to check for that situation.

How would they do that?  They might be long gone by the time the
truncating transaction rolls back.

It might be possible to do something that preserves full MVCC-ness for
concurrent readers, but I don't believe there is any choice but to lock
out concurrent writers until the truncate commits.  If you try to allow
that, there's no way to keep straight whose change goes into which file.
        regards, tom lane


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

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: Must be owner to truncate?
Следующее
От: Joe Conway
Дата:
Сообщение: roles question