Re: logical decoding of two-phase transactions

Поиск
Список
Период
Сортировка
От Stas Kelvich
Тема Re: logical decoding of two-phase transactions
Дата
Msg-id A434797D-1283-42C5-8CE5-7F1CD0B68F36@postgrespro.ru
обсуждение исходный текст
Ответ на Re: logical decoding of two-phase transactions  (Andres Freund <andres@anarazel.de>)
Ответы Re: logical decoding of two-phase transactions  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
> On 28 Mar 2017, at 00:25, Andres Freund <andres@anarazel.de> wrote:
>
> Hi,
>
> On 2017-03-28 00:19:29 +0300, Stas Kelvich wrote:
>> Ok, here it is.
>
> On a very quick skim, this doesn't seem to solve the issues around
> deadlocks of prepared transactions vs. catalog tables.  What if the
> prepared transaction contains something like LOCK pg_class; (there's a
> lot more realistic examples)? Then decoding won't be able to continue,
> until that transaction is committed / aborted?

But why is that deadlock? Seems as just lock.

In case of prepared lock of pg_class decoding will wait until it committed and
then continue to decode. As well as anything in postgres that accesses pg_class,
including inability to connect to database and bricking database if you accidentally
disconnected before committing that tx (as you showed me some while ago :-).

IMO it is issue of being able to prepare such lock, than of decoding.

Is there any other scenarios where catalog readers are blocked except explicit lock
on catalog table? Alters on catalogs seems to be prohibited.

Stas Kelvich
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company





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

Предыдущее
От: Tatsuo Ishii
Дата:
Сообщение: Re: [POC] hash partitioning
Следующее
От: Ashutosh Sharma
Дата:
Сообщение: Re: [sqlsmith] Failed assertion in _hash_kill_items/MarkBufferDirtyHint