Disallow changing slot's failover option in transaction block

Поиск
Список
Период
Сортировка
От Zhijie Hou (Fujitsu)
Тема Disallow changing slot's failover option in transaction block
Дата
Msg-id OS0PR01MB57165542B09DFA4943830BF294082@OS0PR01MB5716.jpnprd01.prod.outlook.com
обсуждение исходный текст
Ответы Re: Disallow changing slot's failover option in transaction block  (Bertrand Drouvot <bertranddrouvot.pg@gmail.com>)
RE: Disallow changing slot's failover option in transaction block  ("Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>)
Список pgsql-hackers
Hi,

Kuroda-San reported an issue off-list that:

If user execute ALTER SUBSCRIPTION SET (failover) command inside a txn block
and rollback, only the subscription option change can be rolled back, while the
replication slot's failover change is preserved.

This is because ALTER SUBSCRIPTION SET (failover) command internally executes
the replication command ALTER_REPLICATION_SLOT to change the replication slot's
failover property, but this replication command execution cannot be
rollback.

To fix it, I think we can prevent user from executing ALTER SUBSCRIPTION set
(failover) inside a txn block, which is also consistent to the ALTER
SUBSCRIPTION REFRESH/DROP SUBSCRIPTION command. Attach a small
patch to address this.

Best Regards,
Hou Zhijie


Вложения

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Typo about the SetDatatabaseHasLoginEventTriggers?
Следующее
От: Bertrand Drouvot
Дата:
Сообщение: Re: promotion related handling in pg_sync_replication_slots()