diff options
author | Amit Kapila <akapila@postgresql.org> | 2024-04-23 12:14:57 +0530 |
---|---|---|
committer | Amit Kapila <akapila@postgresql.org> | 2024-04-23 12:22:30 +0530 |
commit | b29cbd3da4e37db17026b9fe58fb46fe83f467bf (patch) | |
tree | 30134e35c65ff9e7ec50e7288a353fd00f570290 /doc/src/sgml/ref/create_subscription.sgml | |
parent | 480bc6e3ed3a5719cdec076d4943b119890e8171 (diff) |
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
Diffstat (limited to 'doc/src/sgml/ref/create_subscription.sgml')
-rw-r--r-- | doc/src/sgml/ref/create_subscription.sgml | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/doc/src/sgml/ref/create_subscription.sgml b/doc/src/sgml/ref/create_subscription.sgml index 15794731bbb..740b7d94210 100644 --- a/doc/src/sgml/ref/create_subscription.sgml +++ b/doc/src/sgml/ref/create_subscription.sgml @@ -122,8 +122,7 @@ CREATE SUBSCRIPTION <replaceable class="parameter">subscription_name</replaceabl (You cannot combine setting <literal>connect</literal> to <literal>false</literal> with setting <literal>create_slot</literal>, <literal>enabled</literal>, - <literal>copy_data</literal>, or <literal>failover</literal> to - <literal>true</literal>.) + or <literal>copy_data</literal> to <literal>true</literal>.) </para> <para> @@ -183,6 +182,21 @@ CREATE SUBSCRIPTION <replaceable class="parameter">subscription_name</replaceabl <xref linkend="logical-replication-subscription-examples-deferred-slot"/> for examples. </para> + + <para> + When setting <literal>slot_name</literal> to a valid name and + <literal>create_slot</literal> to false, the + <literal>failover</literal> property value of the named slot may + differ from the counterpart <literal>failover</literal> parameter + specified in the subscription. Always ensure the slot property + <literal>failover</literal> matches the counterpart parameter of the + subscription and vice versa. Otherwise, the slot on the publisher may + behave differently from what these subscription options say: for + example, the slot on the publisher could either be synced to the + standbys even when the subscription's <literal>failover</literal> + option is disabled or could be disabled for sync even when the + subscription's <literal>failover</literal> option is enabled. + </para> </listitem> </varlistentry> </variablelist> |