Re: Must be owner to truncate?

Поиск
Список
Период
Сортировка
От Andrew - Supernews
Тема Re: Must be owner to truncate?
Дата
Msg-id slrndcqufn.13l5.andrew+nonews@trinity.supernews.net
обсуждение исходный текст
Ответ на Must be owner to truncate?  (Stephen Frost <sfrost@snowman.net>)
Ответы Re: Must be owner to truncate?  (Stephen Frost <sfrost@snowman.net>)
Список pgsql-hackers
On 2005-07-07, Stephen Frost <sfrost@snowman.net> wrote:
>
>>  * truncate is not MVCC-safe.
>
> Erm, that's why it gets a stronger lock, so I don't really see what
> this has to do with it.

It's not MVCC-safe even with the AccessExclusive lock; it damages snapshots
that were taken before the truncate operation but which don't have a lock
on the table yet. The only reason it doesn't break pg_dump is that the
first thing that pg_dump does is to take AccessShare locks on every table
that it's going to dump.

-- 
Andrew, Supernews
http://www.supernews.com - individual and corporate NNTP services


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

Предыдущее
От: David Fetter
Дата:
Сообщение: Re: SQL99 - Nested Tables
Следующее
От: Darren Alcorn
Дата:
Сообщение: Re: SQL99 - Nested Tables