Skip to content

Commit 2357c92

Browse files
author
Amit Kapila
committed
Rename standby_slot_names to synchronized_standby_slots.
The standby_slot_names GUC allows the specification of physical standby slots that must be synchronized before the logical walsenders associated with logical failover slots. However, for this purpose, the GUC name is too generic. Author: Hou Zhijie Reviewed-by: Bertrand Drouvot, Masahiko Sawada Backpatch-through: 17 Discussion: https://postgr.es/m/ZnWeUgdHong93fQN@momjian.us
1 parent 0c3930d commit 2357c92

File tree

14 files changed

+115
-112
lines changed

14 files changed

+115
-112
lines changed

doc/src/sgml/config.sgml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4569,10 +4569,10 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows
45694569
</listitem>
45704570
</varlistentry>
45714571

4572-
<varlistentry id="guc-standby-slot-names" xreflabel="standby_slot_names">
4573-
<term><varname>standby_slot_names</varname> (<type>string</type>)
4572+
<varlistentry id="guc-synchronized-standby-slots" xreflabel="synchronized_standby_slots">
4573+
<term><varname>synchronized_standby_slots</varname> (<type>string</type>)
45744574
<indexterm>
4575-
<primary><varname>standby_slot_names</varname> configuration parameter</primary>
4575+
<primary><varname>synchronized_standby_slots</varname> configuration parameter</primary>
45764576
</indexterm>
45774577
</term>
45784578
<listitem>
@@ -4587,7 +4587,7 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows
45874587
after the standby is promoted, the physical replication slot for the
45884588
standby should be listed here. Note that logical replication will not
45894589
proceed if the slots specified in the
4590-
<varname>standby_slot_names</varname> do not exist or are invalidated.
4590+
<varname>synchronized_standby_slots</varname> do not exist or are invalidated.
45914591
Additionally, the replication management functions
45924592
<link linkend="pg-replication-slot-advance">
45934593
<function>pg_replication_slot_advance</function></link>,
@@ -4596,12 +4596,12 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows
45964596
<link linkend="pg-logical-slot-peek-changes">
45974597
<function>pg_logical_slot_peek_changes</function></link>,
45984598
when used with logical failover slots, will block until all
4599-
physical slots specified in <varname>standby_slot_names</varname> have
4599+
physical slots specified in <varname>synchronized_standby_slots</varname> have
46004600
confirmed WAL receipt.
46014601
</para>
46024602
<para>
46034603
The standbys corresponding to the physical replication slots in
4604-
<varname>standby_slot_names</varname> must configure
4604+
<varname>synchronized_standby_slots</varname> must configure
46054605
<literal>sync_replication_slots = true</literal> so they can receive
46064606
logical failover slot changes from the primary.
46074607
</para>

doc/src/sgml/func.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29057,7 +29057,7 @@ postgres=# SELECT '0/0'::pg_lsn + pd.segment_number * ps.setting::int + :offset
2905729057
adding the rows produced when decoding each new transaction commit.
2905829058
If the specified slot is a logical failover slot then the function will
2905929059
not return until all physical slots specified in
29060-
<link linkend="guc-standby-slot-names"><varname>standby_slot_names</varname></link>
29060+
<link linkend="guc-synchronized-standby-slots"><varname>synchronized_standby_slots</varname></link>
2906129061
have confirmed WAL receipt.
2906229062
</para></entry>
2906329063
</row>
@@ -29137,7 +29137,7 @@ postgres=# SELECT '0/0'::pg_lsn + pd.segment_number * ps.setting::int + :offset
2913729137
slot may return to an earlier position. If the specified slot is a
2913829138
logical failover slot then the function will not return until all
2913929139
physical slots specified in
29140-
<link linkend="guc-standby-slot-names"><varname>standby_slot_names</varname></link>
29140+
<link linkend="guc-synchronized-standby-slots"><varname>synchronized_standby_slots</varname></link>
2914129141
have confirmed WAL receipt.
2914229142
</para></entry>
2914329143
</row>

doc/src/sgml/logical-replication.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,7 @@ ALTER SUBSCRIPTION
713713
server before the failover happens. To ensure a successful failover, the
714714
standby server must be ahead of the subscriber. This can be achieved by
715715
configuring
716-
<link linkend="guc-standby-slot-names"><varname>standby_slot_names</varname></link>.
716+
<link linkend="guc-synchronized-standby-slots"><varname>synchronized_standby_slots</varname></link>.
717717
</para>
718718

719719
<para>

doc/src/sgml/logicaldecoding.sgml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -385,16 +385,16 @@ postgres=# select * from pg_logical_slot_get_changes('regression_slot', NULL, NU
385385
<literal>dbname</literal> in the
386386
<link linkend="guc-primary-conninfo"><varname>primary_conninfo</varname></link>.
387387
It's highly recommended that the said physical replication slot is named in
388-
<link linkend="guc-standby-slot-names"><varname>standby_slot_names</varname></link>
388+
<link linkend="guc-synchronized-standby-slots"><varname>synchronized_standby_slots</varname></link>
389389
list on the primary, to prevent the subscriber from consuming changes
390390
faster than the hot standby. Even when correctly configured, some latency
391391
is expected when sending changes to logical subscribers due to the waiting
392392
on slots named in
393-
<link linkend="guc-standby-slot-names"><varname>standby_slot_names</varname></link>.
394-
When <varname>standby_slot_names</varname> is utilized, the
393+
<link linkend="guc-synchronized-standby-slots"><varname>synchronized_standby_slots</varname></link>.
394+
When <varname>synchronized_standby_slots</varname> is utilized, the
395395
primary server will not completely shut down until the corresponding
396396
standbys, associated with the physical replication slots specified
397-
in <varname>standby_slot_names</varname>, have confirmed
397+
in <varname>synchronized_standby_slots</varname>, have confirmed
398398
receiving the WAL up to the latest flushed position on the primary server.
399399
</para>
400400

src/backend/replication/logical/slotsync.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -620,8 +620,8 @@ synchronize_one_slot(RemoteSlot *remote_slot, Oid remote_dbid)
620620
if (remote_slot->confirmed_lsn > latestFlushPtr)
621621
{
622622
/*
623-
* Can get here only if GUC 'standby_slot_names' on the primary server
624-
* was not configured correctly.
623+
* Can get here only if GUC 'synchronized_standby_slots' on the
624+
* primary server was not configured correctly.
625625
*/
626626
ereport(AmLogicalSlotSyncWorkerProcess() ? LOG : ERROR,
627627
errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),

0 commit comments

Comments
 (0)