Re: Logical decoding & exported base snapshot

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Logical decoding & exported base snapshot
Дата
Msg-id 17860.1355356353@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Logical decoding & exported base snapshot  (Andres Freund <andres@2ndquadrant.com>)
Ответы Re: Logical decoding & exported base snapshot
Список pgsql-hackers
Andres Freund <andres@2ndquadrant.com> writes:
> On 2012-12-12 12:13:44 +0100, Andres Freund wrote:
>> This morning I wondered whether we couldn't protect against that by
>> acquiring share locks on the catalog rows pg_dump reads, that would
>> result in "could not serialize access due to concurrent update" type of
>> errors which would be easy enough discernible/translateable.
>> While pretty damn ugly that should take care of most of those issues,
>> shouldn't it?

How would it fix anything?  The problem is with DDL that's committed and
gone before pg_dump ever gets to the table's pg_class row.  Once it
does, and takes AccessShareLock on the relation, it's safe.  Adding a
SELECT FOR SHARE step just adds more time before we can get that lock.

Also, locking the pg_class row doesn't provide protection against DDL
that doesn't modify the relation's pg_class row, of which there is
plenty.
        regards, tom lane



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Logical decoding & exported base snapshot
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Logical decoding & exported base snapshot