Fix the handling of the failover option in subscription commands.
Amit Kapila <akapila@postgresql.org>
Fix the handling of the failover option in subscription commands. Do not allow ALTER SUBSCRIPTION ... SET (failover = on|off) in a transaction block as the changed failover option of the slot can't be rolled back. For the same reason, we refrain from altering the replication slot's failover property if the subscription is created with a valid slot_name and create_slot=false. Reprted-by: Kuroda Hayato Author: Hou Zhijie Reviewed-by: Shveta Malik, Bertrand Drouvot, Kuroda Hayato Discussion: https://postgr.es/m/OS0PR01MB57165542B09DFA4943830BF294082@OS0PR01MB5716.jpnprd01.prod.outlook.com
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/ref/alter_subscription.sgml | modified | +4 −3 |
| doc/src/sgml/ref/create_subscription.sgml | modified | +16 −2 |
| doc/src/sgml/ref/pg_dump.sgml | modified | +1 −5 |
| src/backend/commands/subscriptioncmds.c | modified | +6 −22 |
| src/bin/pg_dump/pg_dump.c | modified | +12 −15 |
| src/test/recovery/t/040_standby_failover_slots_sync.pl | modified | +3 −17 |
| src/test/regress/expected/subscription.out | modified | +5 −2 |
| src/test/regress/sql/subscription.sql | modified | +5 −1 |
Documentation touched
Discussion
- Disallow changing slot's failover option in transaction block 18 messages · 2024-04-16 → 2024-04-24