New standby_slot_names GUC in PG 17

Started by Bruce Momjianover 1 year ago31 messages
#1Bruce Momjian
bruce@momjian.us

The release notes have this item:

Allow specification of physical standbys that must be synchronized
before they are visible to subscribers (Hou Zhijie, Shveta Malik)

The new server variable is standby_slot_names.

Is standby_slot_names an accurate name for this GUC? It seems too
generic.

--
Bruce Momjian <bruce@momjian.us> https://momjian.us
EDB https://enterprisedb.com

Only you can decide what is important to you.

#2Nathan Bossart
nathandbossart@gmail.com
In reply to: Bruce Momjian (#1)
Re: New standby_slot_names GUC in PG 17

On Fri, Jun 21, 2024 at 11:37:54AM -0400, Bruce Momjian wrote:

The release notes have this item:

Allow specification of physical standbys that must be synchronized
before they are visible to subscribers (Hou Zhijie, Shveta Malik)

The new server variable is standby_slot_names.

Is standby_slot_names an accurate name for this GUC? It seems too
generic.

+1, I was considering bringing this up, too. I'm still thinking of
alternate names to propose, though.

--
nathan

#3Muhammad Ikram
mmikram@gmail.com
In reply to: Nathan Bossart (#2)
Re: New standby_slot_names GUC in PG 17

Hi,

A humble input, as on primary we have #primary_slot_name = '' then should
not it be okay to have standby_slot_names or standby_slot_name ? It seems
consistent with the Guc on primary.

Another suggestion is *standby_replication_slots*.

Regards,
Muhammad Ikram
Bitnine Global.

On Fri, Jun 21, 2024 at 8:47 PM Nathan Bossart <nathandbossart@gmail.com>
wrote:

On Fri, Jun 21, 2024 at 11:37:54AM -0400, Bruce Momjian wrote:

The release notes have this item:

Allow specification of physical standbys that must be synchronized
before they are visible to subscribers (Hou Zhijie, Shveta Malik)

The new server variable is standby_slot_names.

Is standby_slot_names an accurate name for this GUC? It seems too
generic.

+1, I was considering bringing this up, too. I'm still thinking of
alternate names to propose, though.

--
nathan

--
Muhammad Ikram

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Muhammad Ikram (#3)
Re: New standby_slot_names GUC in PG 17

Muhammad Ikram <mmikram@gmail.com> writes:

A humble input, as on primary we have #primary_slot_name = '' then should
not it be okay to have standby_slot_names or standby_slot_name ? It seems
consistent with the Guc on primary.
Another suggestion is *standby_replication_slots*.

IIUC, Bruce's complaint is that the name is too generic (which I agree
with). Given the stated functionality:

Allow specification of physical standbys that must be synchronized
before they are visible to subscribers (Hou Zhijie, Shveta Malik)

it seems like the name ought to have some connection to
synchronization. Perhaps something like "synchronized_standby_slots"?

I haven't read the patch, so I don't know if this name is especially
on-point. But "standby_slot_names" seems completely unhelpful, as
a server could well have slots that are for standbys but are not to
be included in this list.

regards, tom lane

#5Muhammad Ikram
mmikram@gmail.com
In reply to: Tom Lane (#4)
Re: New standby_slot_names GUC in PG 17

Thanks Tom Lane. You are more insightful.

Regards,
Ikram

On Sat, Jun 22, 2024 at 12:50 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:

Muhammad Ikram <mmikram@gmail.com> writes:

A humble input, as on primary we have #primary_slot_name = '' then

should

not it be okay to have standby_slot_names or standby_slot_name ? It seems
consistent with the Guc on primary.
Another suggestion is *standby_replication_slots*.

IIUC, Bruce's complaint is that the name is too generic (which I agree
with). Given the stated functionality:

Allow specification of physical standbys that must be synchronized
before they are visible to subscribers (Hou Zhijie, Shveta Malik)

it seems like the name ought to have some connection to
synchronization. Perhaps something like "synchronized_standby_slots"?

I haven't read the patch, so I don't know if this name is especially
on-point. But "standby_slot_names" seems completely unhelpful, as
a server could well have slots that are for standbys but are not to
be included in this list.

regards, tom lane

--
Muhammad Ikram

#6Nathan Bossart
nathandbossart@gmail.com
In reply to: Tom Lane (#4)
Re: New standby_slot_names GUC in PG 17

On Fri, Jun 21, 2024 at 03:50:00PM -0400, Tom Lane wrote:

Allow specification of physical standbys that must be synchronized
before they are visible to subscribers (Hou Zhijie, Shveta Malik)

it seems like the name ought to have some connection to
synchronization. Perhaps something like "synchronized_standby_slots"?

IMHO that might be a bit too close to synchronous_standby_names. But the
name might not be the only issue, as there is a separate proposal [0]/messages/by-id/CA+-JvFtq6f7+wAwSdud-x0yMTeMejUhpkyid1Xa_VNpRd_-oPw@mail.gmail.com to
add _another_ GUC to tie standby_slot_names to synchronous replication. I
wonder if this could just be a Boolean parameter or if folks really have
use-cases for both a list of synchronous standbys and a separate list of
synchronous standbys for failover slots.

[0]: /messages/by-id/CA+-JvFtq6f7+wAwSdud-x0yMTeMejUhpkyid1Xa_VNpRd_-oPw@mail.gmail.com

--
nathan

#7Amit Kapila
amit.kapila16@gmail.com
In reply to: Nathan Bossart (#6)
Re: New standby_slot_names GUC in PG 17

On Sat, Jun 22, 2024 at 1:49 AM Nathan Bossart <nathandbossart@gmail.com> wrote:

On Fri, Jun 21, 2024 at 03:50:00PM -0400, Tom Lane wrote:

Allow specification of physical standbys that must be synchronized
before they are visible to subscribers (Hou Zhijie, Shveta Malik)

it seems like the name ought to have some connection to
synchronization. Perhaps something like "synchronized_standby_slots"?

IMHO that might be a bit too close to synchronous_standby_names. But the
name might not be the only issue, as there is a separate proposal [0] to
add _another_ GUC to tie standby_slot_names to synchronous replication. I
wonder if this could just be a Boolean parameter or if folks really have
use-cases for both a list of synchronous standbys and a separate list of
synchronous standbys for failover slots.

Both have separate functionalities. We need to wait for the standby's
in synchronous_standby_names to be synced at the commit time whereas
the standby's in the standby_slot_names doesn't have such a
requirement. The standby's in the standby_slot_names are used by
logical WAL senders such that they will send decoded changes to
plugins only after the specified replication slots confirm receiving
WAL. So, combining them doesn't sound advisable.

--
With Regards,
Amit Kapila.

#8Amit Kapila
amit.kapila16@gmail.com
In reply to: Nathan Bossart (#6)
Re: New standby_slot_names GUC in PG 17

On Sat, Jun 22, 2024 at 1:49 AM Nathan Bossart <nathandbossart@gmail.com> wrote:

On Fri, Jun 21, 2024 at 03:50:00PM -0400, Tom Lane wrote:

Allow specification of physical standbys that must be synchronized
before they are visible to subscribers (Hou Zhijie, Shveta Malik)

it seems like the name ought to have some connection to
synchronization. Perhaps something like "synchronized_standby_slots"?

IMHO that might be a bit too close to synchronous_standby_names.

Right, but better than the current one. The other possibility could be
wait_for_standby_slots.

--
With Regards,
Amit Kapila.

#9Bruce Momjian
bruce@momjian.us
In reply to: Amit Kapila (#8)
Re: New standby_slot_names GUC in PG 17

On Sat, Jun 22, 2024 at 03:17:03PM +0530, Amit Kapila wrote:

On Sat, Jun 22, 2024 at 1:49 AM Nathan Bossart <nathandbossart@gmail.com> wrote:

On Fri, Jun 21, 2024 at 03:50:00PM -0400, Tom Lane wrote:

Allow specification of physical standbys that must be synchronized
before they are visible to subscribers (Hou Zhijie, Shveta Malik)

it seems like the name ought to have some connection to
synchronization. Perhaps something like "synchronized_standby_slots"?

IMHO that might be a bit too close to synchronous_standby_names.

Right, but better than the current one. The other possibility could be
wait_for_standby_slots.

FYI, changing this GUC name could force an initdb because
postgresql.conf would have the old name and removing the comment to
change it would cause an error. Therefore, we should change it ASAP.

--
Bruce Momjian <bruce@momjian.us> https://momjian.us
EDB https://enterprisedb.com

Only you can decide what is important to you.

#10Tom Lane
tgl@sss.pgh.pa.us
In reply to: Bruce Momjian (#9)
Re: New standby_slot_names GUC in PG 17

Bruce Momjian <bruce@momjian.us> writes:

FYI, changing this GUC name could force an initdb because
postgresql.conf would have the old name and removing the comment to
change it would cause an error. Therefore, we should change it ASAP.

That's not reason for a forced initdb IMO. It's easily fixed by
hand.

At this point we're into the release freeze for beta2, so even
if we had consensus on a new name it should wait till after.
So I see no particular urgency to make a decision.

regards, tom lane

#11Zhijie Hou (Fujitsu)
houzj.fnst@fujitsu.com
In reply to: Amit Kapila (#8)
RE: New standby_slot_names GUC in PG 17

On Saturday, June 22, 2024 5:47 PM Amit Kapila <amit.kapila16@gmail.com> wrote:

On Sat, Jun 22, 2024 at 1:49 AM Nathan Bossart
<nathandbossart@gmail.com> wrote:

On Fri, Jun 21, 2024 at 03:50:00PM -0400, Tom Lane wrote:

Allow specification of physical standbys that must be
synchronized before they are visible to subscribers (Hou Zhijie,
Shveta Malik)

it seems like the name ought to have some connection to
synchronization. Perhaps something like "synchronized_standby_slots"?

IMHO that might be a bit too close to synchronous_standby_names.

Right, but better than the current one. The other possibility could be
wait_for_standby_slots.

I agree the current name seems too generic and the suggested ' synchronized_standby_slots '
is better than the current one.

Some other ideas could be:

synchronize_slots_on_standbys: it indicates that the standbys that enabled
slot sync should be listed in this GUC.

logical_replication_wait_slots: it means the logical replication(logical
Walsender process) will wait for these slots to advance the confirm flush
lsn before proceeding.

Best Regards,
Hou zj

#12Masahiko Sawada
sawada.mshk@gmail.com
In reply to: Zhijie Hou (Fujitsu) (#11)
Re: New standby_slot_names GUC in PG 17

On Tue, Jun 25, 2024 at 11:21 AM Zhijie Hou (Fujitsu)
<houzj.fnst@fujitsu.com> wrote:

On Saturday, June 22, 2024 5:47 PM Amit Kapila <amit.kapila16@gmail.com> wrote:

On Sat, Jun 22, 2024 at 1:49 AM Nathan Bossart
<nathandbossart@gmail.com> wrote:

On Fri, Jun 21, 2024 at 03:50:00PM -0400, Tom Lane wrote:

Allow specification of physical standbys that must be
synchronized before they are visible to subscribers (Hou Zhijie,
Shveta Malik)

it seems like the name ought to have some connection to
synchronization. Perhaps something like "synchronized_standby_slots"?

IMHO that might be a bit too close to synchronous_standby_names.

Right, but better than the current one. The other possibility could be
wait_for_standby_slots.

I agree the current name seems too generic and the suggested ' synchronized_standby_slots '
is better than the current one.

Some other ideas could be:

synchronize_slots_on_standbys: it indicates that the standbys that enabled
slot sync should be listed in this GUC.

logical_replication_wait_slots: it means the logical replication(logical
Walsender process) will wait for these slots to advance the confirm flush
lsn before proceeding.

I feel that the name that has some connection to "logical replication"
also sounds good. Let me add some ideas:

- logical_replication_synchronous_standby_slots (might be too long)
- logical_replication_synchronous_slots

Regards,

--
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com

#13Amit Kapila
amit.kapila16@gmail.com
In reply to: Masahiko Sawada (#12)
Re: New standby_slot_names GUC in PG 17

On Tue, Jun 25, 2024 at 8:20 AM Masahiko Sawada <sawada.mshk@gmail.com> wrote:

On Tue, Jun 25, 2024 at 11:21 AM Zhijie Hou (Fujitsu)
<houzj.fnst@fujitsu.com> wrote:

I agree the current name seems too generic and the suggested ' synchronized_standby_slots '
is better than the current one.

Some other ideas could be:

synchronize_slots_on_standbys: it indicates that the standbys that enabled
slot sync should be listed in this GUC.

logical_replication_wait_slots: it means the logical replication(logical
Walsender process) will wait for these slots to advance the confirm flush
lsn before proceeding.

I feel that the name that has some connection to "logical replication"
also sounds good. Let me add some ideas:

- logical_replication_synchronous_standby_slots (might be too long)
- logical_replication_synchronous_slots

I see your point about keeping logical_replication in the name but
that could also lead one to think that this list can contain logical
slots. OTOH, there is some value in keeping '_standby_' in the name as
that is more closely associated with physical standby's and this list
contains physical slots corresponding to physical standby's. So, my
preference is in order as follows: synchronized_standby_slots,
wait_for_standby_slots, logical_replication_wait_slots,
logical_replication_synchronous_slots, and
logical_replication_synchronous_standby_slots.

--
With Regards,
Amit Kapila.

#14Bertrand Drouvot
bertranddrouvot.pg@gmail.com
In reply to: Amit Kapila (#13)
Re: New standby_slot_names GUC in PG 17

Hi,

On Tue, Jun 25, 2024 at 10:24:41AM +0530, Amit Kapila wrote:

On Tue, Jun 25, 2024 at 8:20 AM Masahiko Sawada <sawada.mshk@gmail.com> wrote:

On Tue, Jun 25, 2024 at 11:21 AM Zhijie Hou (Fujitsu)
<houzj.fnst@fujitsu.com> wrote:

I agree the current name seems too generic and the suggested ' synchronized_standby_slots '
is better than the current one.

Some other ideas could be:

synchronize_slots_on_standbys: it indicates that the standbys that enabled
slot sync should be listed in this GUC.

logical_replication_wait_slots: it means the logical replication(logical
Walsender process) will wait for these slots to advance the confirm flush
lsn before proceeding.

I feel that the name that has some connection to "logical replication"
also sounds good. Let me add some ideas:

- logical_replication_synchronous_standby_slots (might be too long)
- logical_replication_synchronous_slots

I see your point about keeping logical_replication in the name but
that could also lead one to think that this list can contain logical
slots.

Agree, and we may add the same functionality for physical replication slots
in the future too (it has been discussed in the thread [1]/messages/by-id/bb437218-73bc-34c3-b8fb-8c1be4ddaec9@enterprisedb.com). So I don't think
"logical" should be part of the name.

OTOH, there is some value in keeping '_standby_' in the name as
that is more closely associated with physical standby's and this list
contains physical slots corresponding to physical standby's. So, my
preference is in order as follows: synchronized_standby_slots,
wait_for_standby_slots, logical_replication_wait_slots,
logical_replication_synchronous_slots, and
logical_replication_synchronous_standby_slots.

I like the idea of having "synchronize[d]" in the name as it makes think of
the feature it is linked to [2]https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=93db6cbda037f1be9544932bd9a785dabf3ff712. The slots mentioned in this parameter are
linked to the "primary_slot_name" parameter on the standby, so what about?

synchronized_primary_slot_names

It makes clear it is somehow linked to "primary_slot_name" and that we want them
to be in sync.

So I'd vote for (in that order);

synchronized_primary_slot_names, synchronized_standby_slots

[1]: /messages/by-id/bb437218-73bc-34c3-b8fb-8c1be4ddaec9@enterprisedb.com
[2]: https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=93db6cbda037f1be9544932bd9a785dabf3ff712

Regards,

--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com

#15Masahiko Sawada
sawada.mshk@gmail.com
In reply to: Amit Kapila (#13)
Re: New standby_slot_names GUC in PG 17

On Tue, Jun 25, 2024 at 1:54 PM Amit Kapila <amit.kapila16@gmail.com> wrote:

On Tue, Jun 25, 2024 at 8:20 AM Masahiko Sawada <sawada.mshk@gmail.com> wrote:

On Tue, Jun 25, 2024 at 11:21 AM Zhijie Hou (Fujitsu)
<houzj.fnst@fujitsu.com> wrote:

I agree the current name seems too generic and the suggested ' synchronized_standby_slots '
is better than the current one.

Some other ideas could be:

synchronize_slots_on_standbys: it indicates that the standbys that enabled
slot sync should be listed in this GUC.

logical_replication_wait_slots: it means the logical replication(logical
Walsender process) will wait for these slots to advance the confirm flush
lsn before proceeding.

I feel that the name that has some connection to "logical replication"
also sounds good. Let me add some ideas:

- logical_replication_synchronous_standby_slots (might be too long)
- logical_replication_synchronous_slots

I see your point about keeping logical_replication in the name but
that could also lead one to think that this list can contain logical
slots.

Right.

OTOH, there is some value in keeping '_standby_' in the name as
that is more closely associated with physical standby's and this list
contains physical slots corresponding to physical standby's.

Agreed.

So, my
preference is in order as follows: synchronized_standby_slots,
wait_for_standby_slots, logical_replication_wait_slots,
logical_replication_synchronous_slots, and
logical_replication_synchronous_standby_slots.

I also prefer synchronized_standby_slots.

From a different angle just for discussion, is it worth considering
the term 'failover' since the purpose of this feature is to ensure a
standby to be ready for failover in terms of logical replication? For
example, failover_standby_slot_names?

Regards,

--
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com

#16Amit Kapila
amit.kapila16@gmail.com
In reply to: Masahiko Sawada (#15)
Re: New standby_slot_names GUC in PG 17

On Tue, Jun 25, 2024 at 12:30 PM Masahiko Sawada <sawada.mshk@gmail.com> wrote:

On Tue, Jun 25, 2024 at 1:54 PM Amit Kapila <amit.kapila16@gmail.com> wrote:

So, my
preference is in order as follows: synchronized_standby_slots,
wait_for_standby_slots, logical_replication_wait_slots,
logical_replication_synchronous_slots, and
logical_replication_synchronous_standby_slots.

I also prefer synchronized_standby_slots.

From a different angle just for discussion, is it worth considering
the term 'failover' since the purpose of this feature is to ensure a
standby to be ready for failover in terms of logical replication? For
example, failover_standby_slot_names?

I feel synchronized better indicates the purpose because we ensure
such slots are synchronized before we process changes for logical
failover slots. We already have a 'failover' option for logical slots
which could make things confusing if we add 'failover' where physical
slots need to be specified.

--
With Regards,
Amit Kapila.

#17Nathan Bossart
nathandbossart@gmail.com
In reply to: Amit Kapila (#16)
Re: New standby_slot_names GUC in PG 17

On Tue, Jun 25, 2024 at 02:02:09PM +0530, Amit Kapila wrote:

On Tue, Jun 25, 2024 at 12:30 PM Masahiko Sawada <sawada.mshk@gmail.com> wrote:

On Tue, Jun 25, 2024 at 1:54 PM Amit Kapila <amit.kapila16@gmail.com> wrote:

So, my
preference is in order as follows: synchronized_standby_slots,
wait_for_standby_slots, logical_replication_wait_slots,
logical_replication_synchronous_slots, and
logical_replication_synchronous_standby_slots.

I also prefer synchronized_standby_slots.

From a different angle just for discussion, is it worth considering
the term 'failover' since the purpose of this feature is to ensure a
standby to be ready for failover in terms of logical replication? For
example, failover_standby_slot_names?

I feel synchronized better indicates the purpose because we ensure
such slots are synchronized before we process changes for logical
failover slots. We already have a 'failover' option for logical slots
which could make things confusing if we add 'failover' where physical
slots need to be specified.

I'm fine with synchronized_standby_slots.

--
nathan

#18Masahiko Sawada
sawada.mshk@gmail.com
In reply to: Amit Kapila (#16)
Re: New standby_slot_names GUC in PG 17

On Tue, Jun 25, 2024 at 5:32 PM Amit Kapila <amit.kapila16@gmail.com> wrote:

On Tue, Jun 25, 2024 at 12:30 PM Masahiko Sawada <sawada.mshk@gmail.com> wrote:

On Tue, Jun 25, 2024 at 1:54 PM Amit Kapila <amit.kapila16@gmail.com> wrote:

So, my
preference is in order as follows: synchronized_standby_slots,
wait_for_standby_slots, logical_replication_wait_slots,
logical_replication_synchronous_slots, and
logical_replication_synchronous_standby_slots.

I also prefer synchronized_standby_slots.

From a different angle just for discussion, is it worth considering
the term 'failover' since the purpose of this feature is to ensure a
standby to be ready for failover in terms of logical replication? For
example, failover_standby_slot_names?

I feel synchronized better indicates the purpose because we ensure
such slots are synchronized before we process changes for logical
failover slots. We already have a 'failover' option for logical slots
which could make things confusing if we add 'failover' where physical
slots need to be specified.

Agreed. So +1 for synchronized_stnadby_slots.

Regards,

--
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com

#19Zhijie Hou (Fujitsu)
houzj.fnst@fujitsu.com
In reply to: Masahiko Sawada (#18)
1 attachment(s)
RE: New standby_slot_names GUC in PG 17

On Wednesday, June 26, 2024 9:40 AM Masahiko Sawada <sawada.mshk@gmail.com> wrote:

On Tue, Jun 25, 2024 at 5:32 PM Amit Kapila <amit.kapila16@gmail.com>
wrote:

On Tue, Jun 25, 2024 at 12:30 PM Masahiko Sawada

<sawada.mshk@gmail.com> wrote:

On Tue, Jun 25, 2024 at 1:54 PM Amit Kapila <amit.kapila16@gmail.com>

wrote:

So, my
preference is in order as follows: synchronized_standby_slots,
wait_for_standby_slots, logical_replication_wait_slots,
logical_replication_synchronous_slots, and
logical_replication_synchronous_standby_slots.

I also prefer synchronized_standby_slots.

From a different angle just for discussion, is it worth considering
the term 'failover' since the purpose of this feature is to ensure a
standby to be ready for failover in terms of logical replication?
For example, failover_standby_slot_names?

I feel synchronized better indicates the purpose because we ensure
such slots are synchronized before we process changes for logical
failover slots. We already have a 'failover' option for logical slots
which could make things confusing if we add 'failover' where physical
slots need to be specified.

Agreed. So +1 for synchronized_stnadby_slots.

+1.

Since there is a consensus on this name, I am attaching the patch to rename
the GUC to synchronized_stnadby_slots. I have confirmed that the regression
tests and pgindent passed for the patch.

Best Regards,
Hou zj

Best Regards,
Hou zj

Attachments:

0001-Rename-standby_slot_names-to-synchronized_standby_sl.patchapplication/octet-stream; name=0001-Rename-standby_slot_names-to-synchronized_standby_sl.patchDownload
From 1d2954999dd61dd82b7dd6cb9d2a6bfd8eb2bffe Mon Sep 17 00:00:00 2001
From: Hou Zhijie <houzj.fnst@cn.fujitsu.com>
Date: Wed, 26 Jun 2024 11:13:55 +0800
Subject: [PATCH] Rename standby_slot_names to synchronized_standby_slots

The standby_slot_names GUC is intended to allow specification of physical
standby slots that must be synchronized before they are visible to
subscribers, but the name seems too generic.

To avoid confusion, rename it to 'synchronized_standby_slots' which better
aligns with the concept of synchronization.
---
 doc/src/sgml/config.sgml                      |  12 +--
 doc/src/sgml/func.sgml                        |   4 +-
 doc/src/sgml/logical-replication.sgml         |   2 +-
 doc/src/sgml/logicaldecoding.sgml             |   8 +-
 doc/src/sgml/release-17.sgml                  |   4 +-
 src/backend/replication/logical/slotsync.c    |   4 +-
 src/backend/replication/slot.c                | 100 +++++++++---------
 src/backend/replication/walsender.c           |   2 +-
 src/backend/utils/misc/guc_tables.c           |   6 +-
 src/backend/utils/misc/postgresql.conf.sample |   2 +-
 src/include/replication/slot.h                |   2 +-
 src/include/replication/walsender_private.h   |   4 +-
 src/include/utils/guc_hooks.h                 |   6 +-
 .../t/040_standby_failover_slots_sync.pl      |  48 +++++----
 14 files changed, 103 insertions(+), 101 deletions(-)

diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index 0c7a9082c5..17d84bd321 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -4569,10 +4569,10 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"'  # Windows
       </listitem>
      </varlistentry>
 
-     <varlistentry id="guc-standby-slot-names" xreflabel="standby_slot_names">
-      <term><varname>standby_slot_names</varname> (<type>string</type>)
+     <varlistentry id="guc-synchronized-standby-slots" xreflabel="synchronized_standby_slots">
+      <term><varname>synchronized_standby_slots</varname> (<type>string</type>)
       <indexterm>
-       <primary><varname>standby_slot_names</varname> configuration parameter</primary>
+       <primary><varname>synchronized_standby_slots</varname> configuration parameter</primary>
       </indexterm>
       </term>
       <listitem>
@@ -4587,7 +4587,7 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"'  # Windows
         after the standby is promoted, the physical replication slot for the
         standby should be listed here. Note that logical replication will not
         proceed if the slots specified in the
-        <varname>standby_slot_names</varname> do not exist or are invalidated.
+        <varname>synchronized_standby_slots</varname> do not exist or are invalidated.
         Additionally, the replication management functions
         <link linkend="pg-replication-slot-advance">
         <function>pg_replication_slot_advance</function></link>,
@@ -4596,12 +4596,12 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"'  # Windows
         <link linkend="pg-logical-slot-peek-changes">
         <function>pg_logical_slot_peek_changes</function></link>,
         when used with logical failover slots, will block until all
-        physical slots specified in <varname>standby_slot_names</varname> have
+        physical slots specified in <varname>synchronized_standby_slots</varname> have
         confirmed WAL receipt.
        </para>
        <para>
         The standbys corresponding to the physical replication slots in
-        <varname>standby_slot_names</varname> must configure
+        <varname>synchronized_standby_slots</varname> must configure
         <literal>sync_replication_slots = true</literal> so they can receive
         logical failover slot changes from the primary.
        </para>
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index 2609269610..1486db696e 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -29047,7 +29047,7 @@ postgres=# SELECT '0/0'::pg_lsn + pd.segment_number * ps.setting::int + :offset
         adding the rows produced when decoding each new transaction commit.
         If the specified slot is a logical failover slot then the function will
         not return until all physical slots specified in
-        <link linkend="guc-standby-slot-names"><varname>standby_slot_names</varname></link>
+        <link linkend="guc-synchronized-standby-slots"><varname>synchronized_standby_slots</varname></link>
         have confirmed WAL receipt.
        </para></entry>
       </row>
@@ -29127,7 +29127,7 @@ postgres=# SELECT '0/0'::pg_lsn + pd.segment_number * ps.setting::int + :offset
         slot may return to an earlier position. If the specified slot is a
         logical failover slot then the function will not return until all
         physical slots specified in
-        <link linkend="guc-standby-slot-names"><varname>standby_slot_names</varname></link>
+        <link linkend="guc-synchronized-standby-slots"><varname>synchronized_standby_slots</varname></link>
         have confirmed WAL receipt.
        </para></entry>
       </row>
diff --git a/doc/src/sgml/logical-replication.sgml b/doc/src/sgml/logical-replication.sgml
index 746d5bd330..ccdd24312b 100644
--- a/doc/src/sgml/logical-replication.sgml
+++ b/doc/src/sgml/logical-replication.sgml
@@ -713,7 +713,7 @@ ALTER SUBSCRIPTION
    server before the failover happens. To ensure a successful failover, the
    standby server must be ahead of the subscriber. This can be achieved by
    configuring
-   <link linkend="guc-standby-slot-names"><varname>standby_slot_names</varname></link>.
+   <link linkend="guc-synchronized-standby-slots"><varname>synchronized_standby_slots</varname></link>.
   </para>
 
   <para>
diff --git a/doc/src/sgml/logicaldecoding.sgml b/doc/src/sgml/logicaldecoding.sgml
index 5a15bbc580..1c4ae38f1b 100644
--- a/doc/src/sgml/logicaldecoding.sgml
+++ b/doc/src/sgml/logicaldecoding.sgml
@@ -385,16 +385,16 @@ postgres=# select * from pg_logical_slot_get_changes('regression_slot', NULL, NU
      <literal>dbname</literal> in the
      <link linkend="guc-primary-conninfo"><varname>primary_conninfo</varname></link>.
      It's highly recommended that the said physical replication slot is named in
-     <link linkend="guc-standby-slot-names"><varname>standby_slot_names</varname></link>
+     <link linkend="guc-synchronized-standby-slots"><varname>synchronized_standby_slots</varname></link>
      list on the primary, to prevent the subscriber from consuming changes
      faster than the hot standby. Even when correctly configured, some latency
      is expected when sending changes to logical subscribers due to the waiting
      on slots named in
-     <link linkend="guc-standby-slot-names"><varname>standby_slot_names</varname></link>.
-     When <varname>standby_slot_names</varname> is utilized, the
+     <link linkend="guc-synchronized-standby-slots"><varname>synchronized_standby_slots</varname></link>.
+     When <varname>synchronized_standby_slots</varname> is utilized, the
      primary server will not completely shut down until the corresponding
      standbys, associated with the physical replication slots specified
-     in <varname>standby_slot_names</varname>, have confirmed
+     in <varname>synchronized_standby_slots</varname>, have confirmed
      receiving the WAL up to the latest flushed position on the primary server.
     </para>
 
diff --git a/doc/src/sgml/release-17.sgml b/doc/src/sgml/release-17.sgml
index b15ed9da07..31c249db76 100644
--- a/doc/src/sgml/release-17.sgml
+++ b/doc/src/sgml/release-17.sgml
@@ -1325,7 +1325,7 @@ Author: Michael Paquier <michael@paquier.xyz>
 
 <!--
 Author: Amit Kapila <akapila@postgresql.org>
-2024-03-08 [bf279ddd1] Introduce a new GUC 'standby_slot_names'.
+2024-03-08 [bf279ddd1] Introduce a new GUC 'synchronized_standby_slots'.
 -->
 
       <listitem>
@@ -1335,7 +1335,7 @@ Author: Amit Kapila <akapila@postgresql.org>
        </para>
 
        <para>
-       The new server variable is <xref linkend="guc-standby-slot-names"/>.
+       The new server variable is <xref linkend="guc-synchronized-standby-slots"/>.
        </para>
       </listitem>
 
diff --git a/src/backend/replication/logical/slotsync.c b/src/backend/replication/logical/slotsync.c
index 56d3fb5d0e..94896aec28 100644
--- a/src/backend/replication/logical/slotsync.c
+++ b/src/backend/replication/logical/slotsync.c
@@ -620,8 +620,8 @@ synchronize_one_slot(RemoteSlot *remote_slot, Oid remote_dbid)
 	if (remote_slot->confirmed_lsn > latestFlushPtr)
 	{
 		/*
-		 * Can get here only if GUC 'standby_slot_names' on the primary server
-		 * was not configured correctly.
+		 * Can get here only if GUC 'synchronized_standby_slots' on the
+		 * primary server was not configured correctly.
 		 */
 		ereport(AmLogicalSlotSyncWorkerProcess() ? LOG : ERROR,
 				errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
diff --git a/src/backend/replication/slot.c b/src/backend/replication/slot.c
index 564cfee127..d1de1ad686 100644
--- a/src/backend/replication/slot.c
+++ b/src/backend/replication/slot.c
@@ -82,11 +82,11 @@ typedef struct ReplicationSlotOnDisk
 } ReplicationSlotOnDisk;
 
 /*
- * Struct for the configuration of standby_slot_names.
+ * Struct for the configuration of synchronized_standby_slots.
  *
  * Note: this must be a flat representation that can be held in a single chunk
  * of guc_malloc'd memory, so that it can be stored as the "extra" data for the
- * standby_slot_names GUC.
+ * synchronized_standby_slots GUC.
  */
 typedef struct
 {
@@ -145,14 +145,14 @@ int			max_replication_slots = 10; /* the maximum number of replication
  * This GUC lists streaming replication standby server slot names that
  * logical WAL sender processes will wait for.
  */
-char	   *standby_slot_names;
+char	   *synchronized_standby_slots;
 
-/* This is the parsed and cached configuration for standby_slot_names */
-static StandbySlotNamesConfigData *standby_slot_names_config;
+/* This is the parsed and cached configuration for synchronized_standby_slots */
+static StandbySlotNamesConfigData *synchronized_standby_slots_config;
 
 /*
  * Oldest LSN that has been confirmed to be flushed to the standbys
- * corresponding to the physical slots specified in the standby_slot_names GUC.
+ * corresponding to the physical slots specified in the synchronized_standby_slots GUC.
  */
 static XLogRecPtr ss_oldest_flush_lsn = InvalidXLogRecPtr;
 
@@ -2412,7 +2412,7 @@ GetSlotInvalidationCause(const char *invalidation_reason)
 }
 
 /*
- * A helper function to validate slots specified in GUC standby_slot_names.
+ * A helper function to validate slots specified in GUC synchronized_standby_slots.
  *
  * The rawname will be parsed, and the result will be saved into *elemlist.
  */
@@ -2472,10 +2472,10 @@ validate_standby_slots(char *rawname, List **elemlist)
 }
 
 /*
- * GUC check_hook for standby_slot_names
+ * GUC check_hook for synchronized_standby_slots
  */
 bool
-check_standby_slot_names(char **newval, void **extra, GucSource source)
+check_synchronized_standby_slots(char **newval, void **extra, GucSource source)
 {
 	char	   *rawname;
 	char	   *ptr;
@@ -2526,10 +2526,10 @@ check_standby_slot_names(char **newval, void **extra, GucSource source)
 }
 
 /*
- * GUC assign_hook for standby_slot_names
+ * GUC assign_hook for synchronized_standby_slots
  */
 void
-assign_standby_slot_names(const char *newval, void *extra)
+assign_synchronized_standby_slots(const char *newval, void *extra)
 {
 	/*
 	 * The standby slots may have changed, so we must recompute the oldest
@@ -2537,19 +2537,19 @@ assign_standby_slot_names(const char *newval, void *extra)
 	 */
 	ss_oldest_flush_lsn = InvalidXLogRecPtr;
 
-	standby_slot_names_config = (StandbySlotNamesConfigData *) extra;
+	synchronized_standby_slots_config = (StandbySlotNamesConfigData *) extra;
 }
 
 /*
- * Check if the passed slot_name is specified in the standby_slot_names GUC.
+ * Check if the passed slot_name is specified in the synchronized_standby_slots GUC.
  */
 bool
 SlotExistsInStandbySlotNames(const char *slot_name)
 {
 	const char *standby_slot_name;
 
-	/* Return false if there is no value in standby_slot_names */
-	if (standby_slot_names_config == NULL)
+	/* Return false if there is no value in synchronized_standby_slots */
+	if (synchronized_standby_slots_config == NULL)
 		return false;
 
 	/*
@@ -2557,8 +2557,8 @@ SlotExistsInStandbySlotNames(const char *slot_name)
 	 * shouldn't hurt but if that turns out not to be true then we can cache
 	 * this information for each WalSender as well.
 	 */
-	standby_slot_name = standby_slot_names_config->slot_names;
-	for (int i = 0; i < standby_slot_names_config->nslotnames; i++)
+	standby_slot_name = synchronized_standby_slots_config->slot_names;
+	for (int i = 0; i < synchronized_standby_slots_config->nslotnames; i++)
 	{
 		if (strcmp(standby_slot_name, slot_name) == 0)
 			return true;
@@ -2570,7 +2570,7 @@ SlotExistsInStandbySlotNames(const char *slot_name)
 }
 
 /*
- * Return true if the slots specified in standby_slot_names have caught up to
+ * Return true if the slots specified in synchronized_standby_slots have caught up to
  * the given WAL location, false otherwise.
  *
  * The elevel parameter specifies the error level used for logging messages
@@ -2585,9 +2585,9 @@ StandbySlotsHaveCaughtup(XLogRecPtr wait_for_lsn, int elevel)
 
 	/*
 	 * Don't need to wait for the standbys to catch up if there is no value in
-	 * standby_slot_names.
+	 * synchronized_standby_slots.
 	 */
-	if (standby_slot_names_config == NULL)
+	if (synchronized_standby_slots_config == NULL)
 		return true;
 
 	/*
@@ -2611,8 +2611,8 @@ StandbySlotsHaveCaughtup(XLogRecPtr wait_for_lsn, int elevel)
 	 */
 	LWLockAcquire(ReplicationSlotControlLock, LW_SHARED);
 
-	name = standby_slot_names_config->slot_names;
-	for (int i = 0; i < standby_slot_names_config->nslotnames; i++)
+	name = synchronized_standby_slots_config->slot_names;
+	for (int i = 0; i < synchronized_standby_slots_config->nslotnames; i++)
 	{
 		XLogRecPtr	restart_lsn;
 		bool		invalidated;
@@ -2624,43 +2624,43 @@ StandbySlotsHaveCaughtup(XLogRecPtr wait_for_lsn, int elevel)
 		if (!slot)
 		{
 			/*
-			 * If a slot name provided in standby_slot_names does not exist,
-			 * report a message and exit the loop. A user can specify a slot
-			 * name that does not exist just before the server startup. The
-			 * GUC check_hook(validate_standby_slots) cannot validate such a
-			 * slot during startup as the ReplicationSlotCtl shared memory is
-			 * not initialized at that time. It is also possible for a user to
-			 * drop the slot in standby_slot_names afterwards.
+			 * If a slot name provided in synchronized_standby_slots does not
+			 * exist, report a message and exit the loop. A user can specify a
+			 * slot name that does not exist just before the server startup.
+			 * The GUC check_hook(validate_standby_slots) cannot validate such
+			 * a slot during startup as the ReplicationSlotCtl shared memory
+			 * is not initialized at that time. It is also possible for a user
+			 * to drop the slot in synchronized_standby_slots afterwards.
 			 */
 			ereport(elevel,
 					errcode(ERRCODE_INVALID_PARAMETER_VALUE),
 					errmsg("replication slot \"%s\" specified in parameter %s does not exist",
-						   name, "standby_slot_names"),
+						   name, "synchronized_standby_slots"),
 					errdetail("Logical replication is waiting on the standby associated with \"%s\".",
 							  name),
 					errhint("Consider creating the slot \"%s\" or amend parameter %s.",
-							name, "standby_slot_names"));
+							name, "synchronized_standby_slots"));
 			break;
 		}
 
 		if (SlotIsLogical(slot))
 		{
 			/*
-			 * If a logical slot name is provided in standby_slot_names,
-			 * report a message and exit the loop. Similar to the non-existent
-			 * case, a user can specify a logical slot name in
-			 * standby_slot_names before the server startup, or drop an
-			 * existing physical slot and recreate a logical slot with the
-			 * same name.
+			 * If a logical slot name is provided in
+			 * synchronized_standby_slots, report a message and exit the loop.
+			 * Similar to the non-existent case, a user can specify a logical
+			 * slot name in synchronized_standby_slots before the server
+			 * startup, or drop an existing physical slot and recreate a
+			 * logical slot with the same name.
 			 */
 			ereport(elevel,
 					errcode(ERRCODE_INVALID_PARAMETER_VALUE),
 					errmsg("cannot have logical replication slot \"%s\" in parameter %s",
-						   name, "standby_slot_names"),
+						   name, "synchronized_standby_slots"),
 					errdetail("Logical replication is waiting for correction on \"%s\".",
 							  name),
 					errhint("Consider removing logical slot \"%s\" from parameter %s.",
-							name, "standby_slot_names"));
+							name, "synchronized_standby_slots"));
 			break;
 		}
 
@@ -2676,11 +2676,11 @@ StandbySlotsHaveCaughtup(XLogRecPtr wait_for_lsn, int elevel)
 			ereport(elevel,
 					errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
 					errmsg("physical slot \"%s\" specified in parameter %s has been invalidated",
-						   name, "standby_slot_names"),
+						   name, "synchronized_standby_slots"),
 					errdetail("Logical replication is waiting on the standby associated with \"%s\".",
 							  name),
 					errhint("Consider dropping and recreating the slot \"%s\" or amend parameter %s.",
-							name, "standby_slot_names"));
+							name, "synchronized_standby_slots"));
 			break;
 		}
 
@@ -2691,11 +2691,11 @@ StandbySlotsHaveCaughtup(XLogRecPtr wait_for_lsn, int elevel)
 				ereport(elevel,
 						errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
 						errmsg("replication slot \"%s\" specified in parameter %s does not have active_pid",
-							   name, "standby_slot_names"),
+							   name, "synchronized_standby_slots"),
 						errdetail("Logical replication is waiting on the standby associated with \"%s\".",
 								  name),
 						errhint("Consider starting standby associated with \"%s\" or amend parameter %s.",
-								name, "standby_slot_names"));
+								name, "synchronized_standby_slots"));
 
 			/* Continue if the current slot hasn't caught up. */
 			break;
@@ -2718,7 +2718,7 @@ StandbySlotsHaveCaughtup(XLogRecPtr wait_for_lsn, int elevel)
 	 * Return false if not all the standbys have caught up to the specified
 	 * WAL location.
 	 */
-	if (caught_up_slot_num != standby_slot_names_config->nslotnames)
+	if (caught_up_slot_num != synchronized_standby_slots_config->nslotnames)
 		return false;
 
 	/* The ss_oldest_flush_lsn must not retreat. */
@@ -2734,7 +2734,7 @@ StandbySlotsHaveCaughtup(XLogRecPtr wait_for_lsn, int elevel)
  * Wait for physical standbys to confirm receiving the given lsn.
  *
  * Used by logical decoding SQL functions. It waits for physical standbys
- * corresponding to the physical slots specified in the standby_slot_names GUC.
+ * corresponding to the physical slots specified in the synchronized_standby_slots GUC.
  */
 void
 WaitForStandbyConfirmation(XLogRecPtr wait_for_lsn)
@@ -2742,9 +2742,9 @@ WaitForStandbyConfirmation(XLogRecPtr wait_for_lsn)
 	/*
 	 * Don't need to wait for the standby to catch up if the current acquired
 	 * slot is not a logical failover slot, or there is no value in
-	 * standby_slot_names.
+	 * synchronized_standby_slots.
 	 */
-	if (!MyReplicationSlot->data.failover || !standby_slot_names_config)
+	if (!MyReplicationSlot->data.failover || !synchronized_standby_slots_config)
 		return;
 
 	ConditionVariablePrepareToSleep(&WalSndCtl->wal_confirm_rcv_cv);
@@ -2764,9 +2764,9 @@ WaitForStandbyConfirmation(XLogRecPtr wait_for_lsn)
 			break;
 
 		/*
-		 * Wait for the slots in the standby_slot_names to catch up, but use a
-		 * timeout (1s) so we can also check if the standby_slot_names has
-		 * been changed.
+		 * Wait for the slots in the synchronized_standby_slots to catch up,
+		 * but use a timeout (1s) so we can also check if the
+		 * synchronized_standby_slots has been changed.
 		 */
 		ConditionVariableTimedSleep(&WalSndCtl->wal_confirm_rcv_cv, 1000,
 									WAIT_EVENT_WAIT_FOR_STANDBY_CONFIRMATION);
diff --git a/src/backend/replication/walsender.c b/src/backend/replication/walsender.c
index c623b07cf0..692b94e89c 100644
--- a/src/backend/replication/walsender.c
+++ b/src/backend/replication/walsender.c
@@ -1727,7 +1727,7 @@ WalSndUpdateProgress(LogicalDecodingContext *ctx, XLogRecPtr lsn, TransactionId
 
 /*
  * Wake up the logical walsender processes with logical failover slots if the
- * currently acquired physical slot is specified in standby_slot_names GUC.
+ * currently acquired physical slot is specified in synchronized_standby_slots GUC.
  */
 void
 PhysicalWakeupLogicalWalSnd(void)
diff --git a/src/backend/utils/misc/guc_tables.c b/src/backend/utils/misc/guc_tables.c
index 46c258be28..6f4188599b 100644
--- a/src/backend/utils/misc/guc_tables.c
+++ b/src/backend/utils/misc/guc_tables.c
@@ -4692,7 +4692,7 @@ struct config_string ConfigureNamesString[] =
 	},
 
 	{
-		{"standby_slot_names", PGC_SIGHUP, REPLICATION_PRIMARY,
+		{"synchronized_standby_slots", PGC_SIGHUP, REPLICATION_PRIMARY,
 			gettext_noop("Lists streaming replication standby server slot "
 						 "names that logical WAL sender processes will wait for."),
 			gettext_noop("Logical WAL sender processes will send decoded "
@@ -4700,9 +4700,9 @@ struct config_string ConfigureNamesString[] =
 						 "replication slots confirm receiving WAL."),
 			GUC_LIST_INPUT
 		},
-		&standby_slot_names,
+		&synchronized_standby_slots,
 		"",
-		check_standby_slot_names, assign_standby_slot_names, NULL
+		check_synchronized_standby_slots, assign_synchronized_standby_slots, NULL
 	},
 
 	/* End-of-list marker */
diff --git a/src/backend/utils/misc/postgresql.conf.sample b/src/backend/utils/misc/postgresql.conf.sample
index e0567de219..d7ad023aa8 100644
--- a/src/backend/utils/misc/postgresql.conf.sample
+++ b/src/backend/utils/misc/postgresql.conf.sample
@@ -344,7 +344,7 @@
 				# method to choose sync standbys, number of sync standbys,
 				# and comma-separated list of application_name
 				# from standby(s); '*' = all
-#standby_slot_names = ''	# streaming replication standby server slot names that
+#synchronized_standby_slots = ''	# streaming replication standby server slot names that
 				# logical walsender processes will wait for
 
 # - Standby Servers -
diff --git a/src/include/replication/slot.h b/src/include/replication/slot.h
index 1bc80960ef..f4bf96b02c 100644
--- a/src/include/replication/slot.h
+++ b/src/include/replication/slot.h
@@ -229,7 +229,7 @@ extern PGDLLIMPORT ReplicationSlot *MyReplicationSlot;
 
 /* GUCs */
 extern PGDLLIMPORT int max_replication_slots;
-extern PGDLLIMPORT char *standby_slot_names;
+extern PGDLLIMPORT char *synchronized_standby_slots;
 
 /* shmem initialization functions */
 extern Size ReplicationSlotsShmemSize(void);
diff --git a/src/include/replication/walsender_private.h b/src/include/replication/walsender_private.h
index 109924ffcd..cf32ac2488 100644
--- a/src/include/replication/walsender_private.h
+++ b/src/include/replication/walsender_private.h
@@ -115,8 +115,8 @@ typedef struct
 
 	/*
 	 * Used by physical walsenders holding slots specified in
-	 * standby_slot_names to wake up logical walsenders holding logical
-	 * failover slots when a walreceiver confirms the receipt of LSN.
+	 * synchronized_standby_slots to wake up logical walsenders holding
+	 * logical failover slots when a walreceiver confirms the receipt of LSN.
 	 */
 	ConditionVariable wal_confirm_rcv_cv;
 
diff --git a/src/include/utils/guc_hooks.h b/src/include/utils/guc_hooks.h
index d64dc5fcdb..070d3f2a1a 100644
--- a/src/include/utils/guc_hooks.h
+++ b/src/include/utils/guc_hooks.h
@@ -174,8 +174,8 @@ extern bool check_wal_consistency_checking(char **newval, void **extra,
 extern void assign_wal_consistency_checking(const char *newval, void *extra);
 extern bool check_wal_segment_size(int *newval, void **extra, GucSource source);
 extern void assign_wal_sync_method(int new_wal_sync_method, void *extra);
-extern bool check_standby_slot_names(char **newval, void **extra,
-									 GucSource source);
-extern void assign_standby_slot_names(const char *newval, void *extra);
+extern bool check_synchronized_standby_slots(char **newval, void **extra,
+											 GucSource source);
+extern void assign_synchronized_standby_slots(const char *newval, void *extra);
 
 #endif							/* GUC_HOOKS_H */
diff --git a/src/test/recovery/t/040_standby_failover_slots_sync.pl b/src/test/recovery/t/040_standby_failover_slots_sync.pl
index 3b6dddba71..2c51cfc3c8 100644
--- a/src/test/recovery/t/040_standby_failover_slots_sync.pl
+++ b/src/test/recovery/t/040_standby_failover_slots_sync.pl
@@ -598,7 +598,7 @@ ok( $standby1->poll_query_until(
 #				| ----> subscriber1 (failover = true, slot_name = lsub1_slot)
 #				| ----> subscriber2 (failover = false, slot_name = lsub2_slot)
 #
-# standby_slot_names = 'sb1_slot'
+# synchronized_standby_slots = 'sb1_slot'
 #
 # The setup is configured in such a way that the logical slot of subscriber1 is
 # enabled for failover, and thus the subscriber1 will wait for the physical
@@ -629,7 +629,7 @@ $primary->wait_for_replay_catchup($standby2);
 # from getting ahead of the specified physical replication slot (sb1_slot).
 $primary->append_conf(
 	'postgresql.conf', qq(
-standby_slot_names = 'sb1_slot'
+synchronized_standby_slots = 'sb1_slot'
 ));
 $primary->reload;
 
@@ -678,11 +678,11 @@ is($result, 't', "subscriber2 gets data from primary");
 # Wait until the primary server logs a warning indicating that it is waiting
 # for the sb1_slot to catch up.
 $primary->wait_for_log(
-	qr/replication slot \"sb1_slot\" specified in parameter standby_slot_names does not have active_pid/,
+	qr/replication slot \"sb1_slot\" specified in parameter synchronized_standby_slots does not have active_pid/,
 	$offset);
 
 # The regress_mysub1 was enabled for failover so it doesn't get the data from
-# primary and keeps waiting for the standby specified in standby_slot_names
+# primary and keeps waiting for the standby specified in synchronized_standby_slots
 # (sb1_slot aka standby1).
 $result =
   $subscriber1->safe_psql('postgres',
@@ -691,7 +691,7 @@ is($result, 't',
 	"subscriber1 doesn't get data from primary until standby1 acknowledges changes"
 );
 
-# Start the standby specified in standby_slot_names (sb1_slot aka standby1) and
+# Start the standby specified in synchronized_standby_slots (sb1_slot aka standby1) and
 # wait for it to catch up with the primary.
 $standby1->start;
 $primary->wait_for_replay_catchup($standby1);
@@ -699,7 +699,7 @@ $result = $standby1->safe_psql('postgres',
 	"SELECT count(*) = $primary_row_count FROM tab_int;");
 is($result, 't', "standby1 gets data from primary");
 
-# Now that the standby specified in standby_slot_names is up and running, the
+# Now that the standby specified in synchronized_standby_slots is up and running, the
 # primary can send the decoded changes to the subscription enabled for failover
 # (i.e. regress_mysub1). While the standby was down, regress_mysub1 didn't
 # receive any data from the primary. i.e. the primary didn't allow it to go
@@ -713,13 +713,13 @@ is($result, 't',
 ##################################################
 # Verify that when using pg_logical_slot_get_changes to consume changes from a
 # logical failover slot, it will also wait for the slots specified in
-# standby_slot_names to catch up.
+# synchronized_standby_slots to catch up.
 ##################################################
 
 # Stop the standby associated with the specified physical replication slot so
 # that the logical replication slot won't receive changes until the standby
 # slot's restart_lsn is advanced or the slot is removed from the
-# standby_slot_names list.
+# synchronized_standby_slots list.
 $primary->safe_psql('postgres', "TRUNCATE tab_int;");
 $primary->wait_for_catchup('regress_mysub1');
 $standby1->stop;
@@ -757,15 +757,15 @@ $back_q->query_until(
 # Wait until the primary server logs a warning indicating that it is waiting
 # for the sb1_slot to catch up.
 $primary->wait_for_log(
-	qr/replication slot \"sb1_slot\" specified in parameter standby_slot_names does not have active_pid/,
+	qr/replication slot \"sb1_slot\" specified in parameter synchronized_standby_slots does not have active_pid/,
 	$offset);
 
-# Remove the standby from the standby_slot_names list and reload the
+# Remove the standby from the synchronized_standby_slots list and reload the
 # configuration.
-$primary->adjust_conf('postgresql.conf', 'standby_slot_names', "''");
+$primary->adjust_conf('postgresql.conf', 'synchronized_standby_slots', "''");
 $primary->reload;
 
-# Since there are no slots in standby_slot_names, the function
+# Since there are no slots in synchronized_standby_slots, the function
 # pg_logical_slot_get_changes should now return, and the session can be
 # stopped.
 $back_q->quit;
@@ -773,9 +773,10 @@ $back_q->quit;
 $primary->safe_psql('postgres',
 	"SELECT pg_drop_replication_slot('test_slot');");
 
-# Add the physical slot (sb1_slot) back to the standby_slot_names for further
+# Add the physical slot (sb1_slot) back to the synchronized_standby_slots for further
 # tests.
-$primary->adjust_conf('postgresql.conf', 'standby_slot_names', "'sb1_slot'");
+$primary->adjust_conf('postgresql.conf', 'synchronized_standby_slots',
+	"'sb1_slot'");
 $primary->reload;
 
 # Enable the regress_mysub1 for further tests
@@ -784,7 +785,7 @@ $subscriber1->safe_psql('postgres',
 
 ##################################################
 # Test that logical replication will wait for the user-created inactive
-# physical slot to catch up until we remove the slot from standby_slot_names.
+# physical slot to catch up until we remove the slot from synchronized_standby_slots.
 ##################################################
 
 $offset = -s $primary->logfile;
@@ -797,33 +798,34 @@ $primary->safe_psql('postgres',
 # Wait until the primary server logs a warning indicating that it is waiting
 # for the sb1_slot to catch up.
 $primary->wait_for_log(
-	qr/replication slot \"sb1_slot\" specified in parameter standby_slot_names does not have active_pid/,
+	qr/replication slot \"sb1_slot\" specified in parameter synchronized_standby_slots does not have active_pid/,
 	$offset);
 
 # The regress_mysub1 doesn't get the data from primary because the specified
-# standby slot (sb1_slot) in standby_slot_names is inactive.
+# standby slot (sb1_slot) in synchronized_standby_slots is inactive.
 $result =
   $subscriber1->safe_psql('postgres', "SELECT count(*) = 0 FROM tab_int;");
 is($result, 't',
 	"subscriber1 doesn't get data as the sb1_slot doesn't catch up");
 
-# Remove the standby from the standby_slot_names list and reload the
+# Remove the standby from the synchronized_standby_slots list and reload the
 # configuration.
-$primary->adjust_conf('postgresql.conf', 'standby_slot_names', "''");
+$primary->adjust_conf('postgresql.conf', 'synchronized_standby_slots', "''");
 $primary->reload;
 
-# Since there are no slots in standby_slot_names, the primary server should now
+# Since there are no slots in synchronized_standby_slots, the primary server should now
 # send the decoded changes to the subscription.
 $primary->wait_for_catchup('regress_mysub1');
 $result = $subscriber1->safe_psql('postgres',
 	"SELECT count(*) = $primary_row_count FROM tab_int;");
 is($result, 't',
-	"subscriber1 gets data from primary after standby1 is removed from the standby_slot_names list"
+	"subscriber1 gets data from primary after standby1 is removed from the synchronized_standby_slots list"
 );
 
-# Add the physical slot (sb1_slot) back to the standby_slot_names for further
+# Add the physical slot (sb1_slot) back to the synchronized_standby_slots for further
 # tests.
-$primary->adjust_conf('postgresql.conf', 'standby_slot_names', "'sb1_slot'");
+$primary->adjust_conf('postgresql.conf', 'synchronized_standby_slots',
+	"'sb1_slot'");
 $primary->reload;
 
 ##################################################
-- 
2.30.0.windows.2

#20Bertrand Drouvot
bertranddrouvot.pg@gmail.com
In reply to: Zhijie Hou (Fujitsu) (#19)
Re: New standby_slot_names GUC in PG 17

Hi,

On Wed, Jun 26, 2024 at 04:17:45AM +0000, Zhijie Hou (Fujitsu) wrote:

On Wednesday, June 26, 2024 9:40 AM Masahiko Sawada <sawada.mshk@gmail.com> wrote:

On Tue, Jun 25, 2024 at 5:32 PM Amit Kapila <amit.kapila16@gmail.com>
wrote:

I feel synchronized better indicates the purpose because we ensure
such slots are synchronized before we process changes for logical
failover slots. We already have a 'failover' option for logical slots
which could make things confusing if we add 'failover' where physical
slots need to be specified.

Agreed. So +1 for synchronized_stnadby_slots.

+1.

Since there is a consensus on this name, I am attaching the patch to rename
the GUC to synchronized_stnadby_slots. I have confirmed that the regression
tests and pgindent passed for the patch.

Thanks for the patch!

A few comments:

1 ====

In the commit message:

"
The standby_slot_names GUC is intended to allow specification of physical
standby slots that must be synchronized before they are visible to
subscribers
"

Not sure that wording is correct, if we feel the need to explain the GUC,
maybe repeat some wording from bf279ddd1c?

2 ====

Should we rename StandbySlotNamesConfigData too?

3 ====

Should we rename SlotExistsInStandbySlotNames too?

4 ====

Should we rename validate_standby_slots() too?

Regards,

--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com

#21Amit Kapila
amit.kapila16@gmail.com
In reply to: Bertrand Drouvot (#20)
Re: New standby_slot_names GUC in PG 17

On Wed, Jun 26, 2024 at 10:19 AM Bertrand Drouvot
<bertranddrouvot.pg@gmail.com> wrote:

2 ====

Should we rename StandbySlotNamesConfigData too?

How about SyncStandbySlotsConfigData?

3 ====

Should we rename SlotExistsInStandbySlotNames too?

Similarly SlotExistsInSyncStandbySlots?

4 ====

Should we rename validate_standby_slots() too?

And validate_sync_standby_slots()?

--- a/doc/src/sgml/release-17.sgml
+++ b/doc/src/sgml/release-17.sgml
@@ -1325,7 +1325,7 @@ Author: Michael Paquier <michael@paquier.xyz>
 <!--
 Author: Amit Kapila <akapila@postgresql.org>
-2024-03-08 [bf279ddd1] Introduce a new GUC 'standby_slot_names'.
+2024-03-08 [bf279ddd1] Introduce a new GUC 'synchronized_standby_slots'.

I am not sure if it is a good idea to change release notes in the same
commit as the code change. I would prefer to do it in a separate
commit.

--
With Regards,
Amit Kapila.

#22Michael Paquier
michael@paquier.xyz
In reply to: Amit Kapila (#21)
Re: New standby_slot_names GUC in PG 17

On Wed, Jun 26, 2024 at 11:39:45AM +0530, Amit Kapila wrote:

--- a/doc/src/sgml/release-17.sgml
+++ b/doc/src/sgml/release-17.sgml
@@ -1325,7 +1325,7 @@ Author: Michael Paquier <michael@paquier.xyz>
<!--
Author: Amit Kapila <akapila@postgresql.org>
-2024-03-08 [bf279ddd1] Introduce a new GUC 'standby_slot_names'.
+2024-03-08 [bf279ddd1] Introduce a new GUC 'synchronized_standby_slots'.

I am not sure if it is a good idea to change release notes in the same
commit as the code change. I would prefer to do it in a separate
commit.

The existing commits referenced cannot change, but it's surely OK to
add a reference to the commit doing the rename for this item in the
release notes, and update the release notes to reflect the new GUC
name. Using two separate commits ensures that the correct reference
about the rename is added to the release notes, so that's the correct
thing to do, IMHO.
--
Michael

#23Bertrand Drouvot
bertranddrouvot.pg@gmail.com
In reply to: Amit Kapila (#21)
Re: New standby_slot_names GUC in PG 17

Hi,

On Wed, Jun 26, 2024 at 11:39:45AM +0530, Amit Kapila wrote:

On Wed, Jun 26, 2024 at 10:19 AM Bertrand Drouvot
<bertranddrouvot.pg@gmail.com> wrote:

2 ====

Should we rename StandbySlotNamesConfigData too?

How about SyncStandbySlotsConfigData?

3 ====

Should we rename SlotExistsInStandbySlotNames too?

Similarly SlotExistsInSyncStandbySlots?

4 ====

Should we rename validate_standby_slots() too?

And validate_sync_standby_slots()?

Thanks!

All of the above proposal sound good to me.

Regards,

--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com

#24Zhijie Hou (Fujitsu)
houzj.fnst@fujitsu.com
In reply to: Bertrand Drouvot (#20)
1 attachment(s)
RE: New standby_slot_names GUC in PG 17

On Wednesday, June 26, 2024 12:49 PM Bertrand Drouvot <bertranddrouvot.pg@gmail.com> wrote:

Hi,

On Wed, Jun 26, 2024 at 04:17:45AM +0000, Zhijie Hou (Fujitsu) wrote:

On Wednesday, June 26, 2024 9:40 AM Masahiko Sawada

<sawada.mshk@gmail.com> wrote:

On Tue, Jun 25, 2024 at 5:32 PM Amit Kapila
<amit.kapila16@gmail.com>
wrote:

I feel synchronized better indicates the purpose because we ensure
such slots are synchronized before we process changes for logical
failover slots. We already have a 'failover' option for logical
slots which could make things confusing if we add 'failover' where
physical slots need to be specified.

Agreed. So +1 for synchronized_stnadby_slots.

+1.

Since there is a consensus on this name, I am attaching the patch to
rename the GUC to synchronized_stnadby_slots. I have confirmed that
the regression tests and pgindent passed for the patch.

A few comments:

Thanks for the comments!

1 ====

In the commit message:

"
The standby_slot_names GUC is intended to allow specification of physical
standby slots that must be synchronized before they are visible to
subscribers
"

Not sure that wording is correct, if we feel the need to explain the GUC, maybe
repeat some wording from bf279ddd1c?

I intentionally copied some words from release note of this GUC which was
also part of the content in the initial email of this thread. I think it
would be easy to understand than the original commit msg. But others may
have different opinion, so I would leave the decision to the committer. (I adjusted
a bit the word in this version).

2 ====

Should we rename StandbySlotNamesConfigData too?

3 ====

Should we rename SlotExistsInStandbySlotNames too?

4 ====

Should we rename validate_standby_slots() too?

Renamed these to the names suggested by Amit.

Attach the v2 patch set which addressed above and removed
the changes in release-17.sgml according to the comment from Amit.

Best Regards,
Hou zj

Attachments:

v2-0001-Rename-standby_slot_names-to-synchronized_standby.patchapplication/octet-stream; name=v2-0001-Rename-standby_slot_names-to-synchronized_standby.patchDownload
From b1b3d32ea1836048a9688dea20405a8e1b6d15f3 Mon Sep 17 00:00:00 2001
From: Hou Zhijie <houzj.fnst@cn.fujitsu.com>
Date: Wed, 26 Jun 2024 11:13:55 +0800
Subject: [PATCH v2] Rename standby_slot_names to synchronized_standby_slots

The standby_slot_names GUC allows specification of physical
standby slots that must be synchronized before they are visible to
subscribers, but the name seems too generic.

To avoid confusion, rename it to 'synchronized_standby_slots' which better
aligns with the concept of synchronization.
---
 doc/src/sgml/config.sgml                      |  12 +-
 doc/src/sgml/func.sgml                        |   4 +-
 doc/src/sgml/logical-replication.sgml         |   2 +-
 doc/src/sgml/logicaldecoding.sgml             |   8 +-
 src/backend/replication/logical/slotsync.c    |   4 +-
 src/backend/replication/slot.c                | 119 +++++++++---------
 src/backend/replication/walsender.c           |   4 +-
 src/backend/utils/misc/guc_tables.c           |   6 +-
 src/backend/utils/misc/postgresql.conf.sample |   4 +-
 src/include/replication/slot.h                |   4 +-
 src/include/replication/walsender_private.h   |   4 +-
 src/include/utils/guc_hooks.h                 |   6 +-
 .../t/040_standby_failover_slots_sync.pl      |  48 +++----
 src/tools/pgindent/typedefs.list              |   2 +-
 14 files changed, 115 insertions(+), 112 deletions(-)

diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index 0c7a9082c5..17d84bd321 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -4569,10 +4569,10 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"'  # Windows
       </listitem>
      </varlistentry>
 
-     <varlistentry id="guc-standby-slot-names" xreflabel="standby_slot_names">
-      <term><varname>standby_slot_names</varname> (<type>string</type>)
+     <varlistentry id="guc-synchronized-standby-slots" xreflabel="synchronized_standby_slots">
+      <term><varname>synchronized_standby_slots</varname> (<type>string</type>)
       <indexterm>
-       <primary><varname>standby_slot_names</varname> configuration parameter</primary>
+       <primary><varname>synchronized_standby_slots</varname> configuration parameter</primary>
       </indexterm>
       </term>
       <listitem>
@@ -4587,7 +4587,7 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"'  # Windows
         after the standby is promoted, the physical replication slot for the
         standby should be listed here. Note that logical replication will not
         proceed if the slots specified in the
-        <varname>standby_slot_names</varname> do not exist or are invalidated.
+        <varname>synchronized_standby_slots</varname> do not exist or are invalidated.
         Additionally, the replication management functions
         <link linkend="pg-replication-slot-advance">
         <function>pg_replication_slot_advance</function></link>,
@@ -4596,12 +4596,12 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"'  # Windows
         <link linkend="pg-logical-slot-peek-changes">
         <function>pg_logical_slot_peek_changes</function></link>,
         when used with logical failover slots, will block until all
-        physical slots specified in <varname>standby_slot_names</varname> have
+        physical slots specified in <varname>synchronized_standby_slots</varname> have
         confirmed WAL receipt.
        </para>
        <para>
         The standbys corresponding to the physical replication slots in
-        <varname>standby_slot_names</varname> must configure
+        <varname>synchronized_standby_slots</varname> must configure
         <literal>sync_replication_slots = true</literal> so they can receive
         logical failover slot changes from the primary.
        </para>
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index 2609269610..1486db696e 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -29047,7 +29047,7 @@ postgres=# SELECT '0/0'::pg_lsn + pd.segment_number * ps.setting::int + :offset
         adding the rows produced when decoding each new transaction commit.
         If the specified slot is a logical failover slot then the function will
         not return until all physical slots specified in
-        <link linkend="guc-standby-slot-names"><varname>standby_slot_names</varname></link>
+        <link linkend="guc-synchronized-standby-slots"><varname>synchronized_standby_slots</varname></link>
         have confirmed WAL receipt.
        </para></entry>
       </row>
@@ -29127,7 +29127,7 @@ postgres=# SELECT '0/0'::pg_lsn + pd.segment_number * ps.setting::int + :offset
         slot may return to an earlier position. If the specified slot is a
         logical failover slot then the function will not return until all
         physical slots specified in
-        <link linkend="guc-standby-slot-names"><varname>standby_slot_names</varname></link>
+        <link linkend="guc-synchronized-standby-slots"><varname>synchronized_standby_slots</varname></link>
         have confirmed WAL receipt.
        </para></entry>
       </row>
diff --git a/doc/src/sgml/logical-replication.sgml b/doc/src/sgml/logical-replication.sgml
index 746d5bd330..ccdd24312b 100644
--- a/doc/src/sgml/logical-replication.sgml
+++ b/doc/src/sgml/logical-replication.sgml
@@ -713,7 +713,7 @@ ALTER SUBSCRIPTION
    server before the failover happens. To ensure a successful failover, the
    standby server must be ahead of the subscriber. This can be achieved by
    configuring
-   <link linkend="guc-standby-slot-names"><varname>standby_slot_names</varname></link>.
+   <link linkend="guc-synchronized-standby-slots"><varname>synchronized_standby_slots</varname></link>.
   </para>
 
   <para>
diff --git a/doc/src/sgml/logicaldecoding.sgml b/doc/src/sgml/logicaldecoding.sgml
index 5a15bbc580..1c4ae38f1b 100644
--- a/doc/src/sgml/logicaldecoding.sgml
+++ b/doc/src/sgml/logicaldecoding.sgml
@@ -385,16 +385,16 @@ postgres=# select * from pg_logical_slot_get_changes('regression_slot', NULL, NU
      <literal>dbname</literal> in the
      <link linkend="guc-primary-conninfo"><varname>primary_conninfo</varname></link>.
      It's highly recommended that the said physical replication slot is named in
-     <link linkend="guc-standby-slot-names"><varname>standby_slot_names</varname></link>
+     <link linkend="guc-synchronized-standby-slots"><varname>synchronized_standby_slots</varname></link>
      list on the primary, to prevent the subscriber from consuming changes
      faster than the hot standby. Even when correctly configured, some latency
      is expected when sending changes to logical subscribers due to the waiting
      on slots named in
-     <link linkend="guc-standby-slot-names"><varname>standby_slot_names</varname></link>.
-     When <varname>standby_slot_names</varname> is utilized, the
+     <link linkend="guc-synchronized-standby-slots"><varname>synchronized_standby_slots</varname></link>.
+     When <varname>synchronized_standby_slots</varname> is utilized, the
      primary server will not completely shut down until the corresponding
      standbys, associated with the physical replication slots specified
-     in <varname>standby_slot_names</varname>, have confirmed
+     in <varname>synchronized_standby_slots</varname>, have confirmed
      receiving the WAL up to the latest flushed position on the primary server.
     </para>
 
diff --git a/src/backend/replication/logical/slotsync.c b/src/backend/replication/logical/slotsync.c
index 56d3fb5d0e..94896aec28 100644
--- a/src/backend/replication/logical/slotsync.c
+++ b/src/backend/replication/logical/slotsync.c
@@ -620,8 +620,8 @@ synchronize_one_slot(RemoteSlot *remote_slot, Oid remote_dbid)
 	if (remote_slot->confirmed_lsn > latestFlushPtr)
 	{
 		/*
-		 * Can get here only if GUC 'standby_slot_names' on the primary server
-		 * was not configured correctly.
+		 * Can get here only if GUC 'synchronized_standby_slots' on the
+		 * primary server was not configured correctly.
 		 */
 		ereport(AmLogicalSlotSyncWorkerProcess() ? LOG : ERROR,
 				errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
diff --git a/src/backend/replication/slot.c b/src/backend/replication/slot.c
index 564cfee127..baf9b89dc4 100644
--- a/src/backend/replication/slot.c
+++ b/src/backend/replication/slot.c
@@ -82,11 +82,11 @@ typedef struct ReplicationSlotOnDisk
 } ReplicationSlotOnDisk;
 
 /*
- * Struct for the configuration of standby_slot_names.
+ * Struct for the configuration of synchronized_standby_slots.
  *
  * Note: this must be a flat representation that can be held in a single chunk
  * of guc_malloc'd memory, so that it can be stored as the "extra" data for the
- * standby_slot_names GUC.
+ * synchronized_standby_slots GUC.
  */
 typedef struct
 {
@@ -97,7 +97,7 @@ typedef struct
 	 * slot_names contains 'nslotnames' consecutive null-terminated C strings.
 	 */
 	char		slot_names[FLEXIBLE_ARRAY_MEMBER];
-} StandbySlotNamesConfigData;
+} SyncStandbySlotsConfigData;
 
 /*
  * Lookup table for slot invalidation causes.
@@ -145,14 +145,14 @@ int			max_replication_slots = 10; /* the maximum number of replication
  * This GUC lists streaming replication standby server slot names that
  * logical WAL sender processes will wait for.
  */
-char	   *standby_slot_names;
+char	   *synchronized_standby_slots;
 
-/* This is the parsed and cached configuration for standby_slot_names */
-static StandbySlotNamesConfigData *standby_slot_names_config;
+/* This is the parsed and cached configuration for synchronized_standby_slots */
+static SyncStandbySlotsConfigData *synchronized_standby_slots_config;
 
 /*
  * Oldest LSN that has been confirmed to be flushed to the standbys
- * corresponding to the physical slots specified in the standby_slot_names GUC.
+ * corresponding to the physical slots specified in the synchronized_standby_slots GUC.
  */
 static XLogRecPtr ss_oldest_flush_lsn = InvalidXLogRecPtr;
 
@@ -2412,12 +2412,12 @@ GetSlotInvalidationCause(const char *invalidation_reason)
 }
 
 /*
- * A helper function to validate slots specified in GUC standby_slot_names.
+ * A helper function to validate slots specified in GUC synchronized_standby_slots.
  *
  * The rawname will be parsed, and the result will be saved into *elemlist.
  */
 static bool
-validate_standby_slots(char *rawname, List **elemlist)
+validate_sync_standby_slots(char *rawname, List **elemlist)
 {
 	bool		ok;
 
@@ -2472,17 +2472,17 @@ validate_standby_slots(char *rawname, List **elemlist)
 }
 
 /*
- * GUC check_hook for standby_slot_names
+ * GUC check_hook for synchronized_standby_slots
  */
 bool
-check_standby_slot_names(char **newval, void **extra, GucSource source)
+check_synchronized_standby_slots(char **newval, void **extra, GucSource source)
 {
 	char	   *rawname;
 	char	   *ptr;
 	List	   *elemlist;
 	int			size;
 	bool		ok;
-	StandbySlotNamesConfigData *config;
+	SyncStandbySlotsConfigData *config;
 
 	if ((*newval)[0] == '\0')
 		return true;
@@ -2491,7 +2491,7 @@ check_standby_slot_names(char **newval, void **extra, GucSource source)
 	rawname = pstrdup(*newval);
 
 	/* Now verify if the specified slots exist and have correct type */
-	ok = validate_standby_slots(rawname, &elemlist);
+	ok = validate_sync_standby_slots(rawname, &elemlist);
 
 	if (!ok || elemlist == NIL)
 	{
@@ -2500,15 +2500,15 @@ check_standby_slot_names(char **newval, void **extra, GucSource source)
 		return ok;
 	}
 
-	/* Compute the size required for the StandbySlotNamesConfigData struct */
-	size = offsetof(StandbySlotNamesConfigData, slot_names);
+	/* Compute the size required for the SyncStandbySlotsConfigData struct */
+	size = offsetof(SyncStandbySlotsConfigData, slot_names);
 	foreach_ptr(char, slot_name, elemlist)
 		size += strlen(slot_name) + 1;
 
 	/* GUC extra value must be guc_malloc'd, not palloc'd */
-	config = (StandbySlotNamesConfigData *) guc_malloc(LOG, size);
+	config = (SyncStandbySlotsConfigData *) guc_malloc(LOG, size);
 
-	/* Transform the data into StandbySlotNamesConfigData */
+	/* Transform the data into SyncStandbySlotsConfigData */
 	config->nslotnames = list_length(elemlist);
 
 	ptr = config->slot_names;
@@ -2526,10 +2526,10 @@ check_standby_slot_names(char **newval, void **extra, GucSource source)
 }
 
 /*
- * GUC assign_hook for standby_slot_names
+ * GUC assign_hook for synchronized_standby_slots
  */
 void
-assign_standby_slot_names(const char *newval, void *extra)
+assign_synchronized_standby_slots(const char *newval, void *extra)
 {
 	/*
 	 * The standby slots may have changed, so we must recompute the oldest
@@ -2537,19 +2537,19 @@ assign_standby_slot_names(const char *newval, void *extra)
 	 */
 	ss_oldest_flush_lsn = InvalidXLogRecPtr;
 
-	standby_slot_names_config = (StandbySlotNamesConfigData *) extra;
+	synchronized_standby_slots_config = (SyncStandbySlotsConfigData *) extra;
 }
 
 /*
- * Check if the passed slot_name is specified in the standby_slot_names GUC.
+ * Check if the passed slot_name is specified in the synchronized_standby_slots GUC.
  */
 bool
-SlotExistsInStandbySlotNames(const char *slot_name)
+SlotExistsInSyncStandbySlots(const char *slot_name)
 {
 	const char *standby_slot_name;
 
-	/* Return false if there is no value in standby_slot_names */
-	if (standby_slot_names_config == NULL)
+	/* Return false if there is no value in synchronized_standby_slots */
+	if (synchronized_standby_slots_config == NULL)
 		return false;
 
 	/*
@@ -2557,8 +2557,8 @@ SlotExistsInStandbySlotNames(const char *slot_name)
 	 * shouldn't hurt but if that turns out not to be true then we can cache
 	 * this information for each WalSender as well.
 	 */
-	standby_slot_name = standby_slot_names_config->slot_names;
-	for (int i = 0; i < standby_slot_names_config->nslotnames; i++)
+	standby_slot_name = synchronized_standby_slots_config->slot_names;
+	for (int i = 0; i < synchronized_standby_slots_config->nslotnames; i++)
 	{
 		if (strcmp(standby_slot_name, slot_name) == 0)
 			return true;
@@ -2570,7 +2570,7 @@ SlotExistsInStandbySlotNames(const char *slot_name)
 }
 
 /*
- * Return true if the slots specified in standby_slot_names have caught up to
+ * Return true if the slots specified in synchronized_standby_slots have caught up to
  * the given WAL location, false otherwise.
  *
  * The elevel parameter specifies the error level used for logging messages
@@ -2585,9 +2585,9 @@ StandbySlotsHaveCaughtup(XLogRecPtr wait_for_lsn, int elevel)
 
 	/*
 	 * Don't need to wait for the standbys to catch up if there is no value in
-	 * standby_slot_names.
+	 * synchronized_standby_slots.
 	 */
-	if (standby_slot_names_config == NULL)
+	if (synchronized_standby_slots_config == NULL)
 		return true;
 
 	/*
@@ -2611,8 +2611,8 @@ StandbySlotsHaveCaughtup(XLogRecPtr wait_for_lsn, int elevel)
 	 */
 	LWLockAcquire(ReplicationSlotControlLock, LW_SHARED);
 
-	name = standby_slot_names_config->slot_names;
-	for (int i = 0; i < standby_slot_names_config->nslotnames; i++)
+	name = synchronized_standby_slots_config->slot_names;
+	for (int i = 0; i < synchronized_standby_slots_config->nslotnames; i++)
 	{
 		XLogRecPtr	restart_lsn;
 		bool		invalidated;
@@ -2624,43 +2624,44 @@ StandbySlotsHaveCaughtup(XLogRecPtr wait_for_lsn, int elevel)
 		if (!slot)
 		{
 			/*
-			 * If a slot name provided in standby_slot_names does not exist,
-			 * report a message and exit the loop. A user can specify a slot
-			 * name that does not exist just before the server startup. The
-			 * GUC check_hook(validate_standby_slots) cannot validate such a
-			 * slot during startup as the ReplicationSlotCtl shared memory is
-			 * not initialized at that time. It is also possible for a user to
-			 * drop the slot in standby_slot_names afterwards.
+			 * If a slot name provided in synchronized_standby_slots does not
+			 * exist, report a message and exit the loop. A user can specify a
+			 * slot name that does not exist just before the server startup.
+			 * The GUC check_hook(validate_sync_standby_slots) cannot validate
+			 * such a slot during startup as the ReplicationSlotCtl shared
+			 * memory is not initialized at that time. It is also possible for
+			 * a user to drop the slot in synchronized_standby_slots
+			 * afterwards.
 			 */
 			ereport(elevel,
 					errcode(ERRCODE_INVALID_PARAMETER_VALUE),
 					errmsg("replication slot \"%s\" specified in parameter %s does not exist",
-						   name, "standby_slot_names"),
+						   name, "synchronized_standby_slots"),
 					errdetail("Logical replication is waiting on the standby associated with \"%s\".",
 							  name),
 					errhint("Consider creating the slot \"%s\" or amend parameter %s.",
-							name, "standby_slot_names"));
+							name, "synchronized_standby_slots"));
 			break;
 		}
 
 		if (SlotIsLogical(slot))
 		{
 			/*
-			 * If a logical slot name is provided in standby_slot_names,
-			 * report a message and exit the loop. Similar to the non-existent
-			 * case, a user can specify a logical slot name in
-			 * standby_slot_names before the server startup, or drop an
-			 * existing physical slot and recreate a logical slot with the
-			 * same name.
+			 * If a logical slot name is provided in
+			 * synchronized_standby_slots, report a message and exit the loop.
+			 * Similar to the non-existent case, a user can specify a logical
+			 * slot name in synchronized_standby_slots before the server
+			 * startup, or drop an existing physical slot and recreate a
+			 * logical slot with the same name.
 			 */
 			ereport(elevel,
 					errcode(ERRCODE_INVALID_PARAMETER_VALUE),
 					errmsg("cannot have logical replication slot \"%s\" in parameter %s",
-						   name, "standby_slot_names"),
+						   name, "synchronized_standby_slots"),
 					errdetail("Logical replication is waiting for correction on \"%s\".",
 							  name),
 					errhint("Consider removing logical slot \"%s\" from parameter %s.",
-							name, "standby_slot_names"));
+							name, "synchronized_standby_slots"));
 			break;
 		}
 
@@ -2676,11 +2677,11 @@ StandbySlotsHaveCaughtup(XLogRecPtr wait_for_lsn, int elevel)
 			ereport(elevel,
 					errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
 					errmsg("physical slot \"%s\" specified in parameter %s has been invalidated",
-						   name, "standby_slot_names"),
+						   name, "synchronized_standby_slots"),
 					errdetail("Logical replication is waiting on the standby associated with \"%s\".",
 							  name),
 					errhint("Consider dropping and recreating the slot \"%s\" or amend parameter %s.",
-							name, "standby_slot_names"));
+							name, "synchronized_standby_slots"));
 			break;
 		}
 
@@ -2691,11 +2692,11 @@ StandbySlotsHaveCaughtup(XLogRecPtr wait_for_lsn, int elevel)
 				ereport(elevel,
 						errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
 						errmsg("replication slot \"%s\" specified in parameter %s does not have active_pid",
-							   name, "standby_slot_names"),
+							   name, "synchronized_standby_slots"),
 						errdetail("Logical replication is waiting on the standby associated with \"%s\".",
 								  name),
 						errhint("Consider starting standby associated with \"%s\" or amend parameter %s.",
-								name, "standby_slot_names"));
+								name, "synchronized_standby_slots"));
 
 			/* Continue if the current slot hasn't caught up. */
 			break;
@@ -2718,7 +2719,7 @@ StandbySlotsHaveCaughtup(XLogRecPtr wait_for_lsn, int elevel)
 	 * Return false if not all the standbys have caught up to the specified
 	 * WAL location.
 	 */
-	if (caught_up_slot_num != standby_slot_names_config->nslotnames)
+	if (caught_up_slot_num != synchronized_standby_slots_config->nslotnames)
 		return false;
 
 	/* The ss_oldest_flush_lsn must not retreat. */
@@ -2734,7 +2735,7 @@ StandbySlotsHaveCaughtup(XLogRecPtr wait_for_lsn, int elevel)
  * Wait for physical standbys to confirm receiving the given lsn.
  *
  * Used by logical decoding SQL functions. It waits for physical standbys
- * corresponding to the physical slots specified in the standby_slot_names GUC.
+ * corresponding to the physical slots specified in the synchronized_standby_slots GUC.
  */
 void
 WaitForStandbyConfirmation(XLogRecPtr wait_for_lsn)
@@ -2742,9 +2743,9 @@ WaitForStandbyConfirmation(XLogRecPtr wait_for_lsn)
 	/*
 	 * Don't need to wait for the standby to catch up if the current acquired
 	 * slot is not a logical failover slot, or there is no value in
-	 * standby_slot_names.
+	 * synchronized_standby_slots.
 	 */
-	if (!MyReplicationSlot->data.failover || !standby_slot_names_config)
+	if (!MyReplicationSlot->data.failover || !synchronized_standby_slots_config)
 		return;
 
 	ConditionVariablePrepareToSleep(&WalSndCtl->wal_confirm_rcv_cv);
@@ -2764,9 +2765,9 @@ WaitForStandbyConfirmation(XLogRecPtr wait_for_lsn)
 			break;
 
 		/*
-		 * Wait for the slots in the standby_slot_names to catch up, but use a
-		 * timeout (1s) so we can also check if the standby_slot_names has
-		 * been changed.
+		 * Wait for the slots in the synchronized_standby_slots to catch up,
+		 * but use a timeout (1s) so we can also check if the
+		 * synchronized_standby_slots has been changed.
 		 */
 		ConditionVariableTimedSleep(&WalSndCtl->wal_confirm_rcv_cv, 1000,
 									WAIT_EVENT_WAIT_FOR_STANDBY_CONFIRMATION);
diff --git a/src/backend/replication/walsender.c b/src/backend/replication/walsender.c
index c623b07cf0..59d1dfc7e2 100644
--- a/src/backend/replication/walsender.c
+++ b/src/backend/replication/walsender.c
@@ -1727,7 +1727,7 @@ WalSndUpdateProgress(LogicalDecodingContext *ctx, XLogRecPtr lsn, TransactionId
 
 /*
  * Wake up the logical walsender processes with logical failover slots if the
- * currently acquired physical slot is specified in standby_slot_names GUC.
+ * currently acquired physical slot is specified in synchronized_standby_slots GUC.
  */
 void
 PhysicalWakeupLogicalWalSnd(void)
@@ -1742,7 +1742,7 @@ PhysicalWakeupLogicalWalSnd(void)
 	if (RecoveryInProgress())
 		return;
 
-	if (SlotExistsInStandbySlotNames(NameStr(MyReplicationSlot->data.name)))
+	if (SlotExistsInSyncStandbySlots(NameStr(MyReplicationSlot->data.name)))
 		ConditionVariableBroadcast(&WalSndCtl->wal_confirm_rcv_cv);
 }
 
diff --git a/src/backend/utils/misc/guc_tables.c b/src/backend/utils/misc/guc_tables.c
index 46c258be28..6f4188599b 100644
--- a/src/backend/utils/misc/guc_tables.c
+++ b/src/backend/utils/misc/guc_tables.c
@@ -4692,7 +4692,7 @@ struct config_string ConfigureNamesString[] =
 	},
 
 	{
-		{"standby_slot_names", PGC_SIGHUP, REPLICATION_PRIMARY,
+		{"synchronized_standby_slots", PGC_SIGHUP, REPLICATION_PRIMARY,
 			gettext_noop("Lists streaming replication standby server slot "
 						 "names that logical WAL sender processes will wait for."),
 			gettext_noop("Logical WAL sender processes will send decoded "
@@ -4700,9 +4700,9 @@ struct config_string ConfigureNamesString[] =
 						 "replication slots confirm receiving WAL."),
 			GUC_LIST_INPUT
 		},
-		&standby_slot_names,
+		&synchronized_standby_slots,
 		"",
-		check_standby_slot_names, assign_standby_slot_names, NULL
+		check_synchronized_standby_slots, assign_synchronized_standby_slots, NULL
 	},
 
 	/* End-of-list marker */
diff --git a/src/backend/utils/misc/postgresql.conf.sample b/src/backend/utils/misc/postgresql.conf.sample
index e0567de219..9ec9f97e92 100644
--- a/src/backend/utils/misc/postgresql.conf.sample
+++ b/src/backend/utils/misc/postgresql.conf.sample
@@ -344,8 +344,8 @@
 				# method to choose sync standbys, number of sync standbys,
 				# and comma-separated list of application_name
 				# from standby(s); '*' = all
-#standby_slot_names = ''	# streaming replication standby server slot names that
-				# logical walsender processes will wait for
+#synchronized_standby_slots = ''	# streaming replication standby server slot
+				# names that logical walsender processes will wait for
 
 # - Standby Servers -
 
diff --git a/src/include/replication/slot.h b/src/include/replication/slot.h
index 1bc80960ef..c9675ee87c 100644
--- a/src/include/replication/slot.h
+++ b/src/include/replication/slot.h
@@ -229,7 +229,7 @@ extern PGDLLIMPORT ReplicationSlot *MyReplicationSlot;
 
 /* GUCs */
 extern PGDLLIMPORT int max_replication_slots;
-extern PGDLLIMPORT char *standby_slot_names;
+extern PGDLLIMPORT char *synchronized_standby_slots;
 
 /* shmem initialization functions */
 extern Size ReplicationSlotsShmemSize(void);
@@ -278,7 +278,7 @@ extern void CheckSlotPermissions(void);
 extern ReplicationSlotInvalidationCause
 			GetSlotInvalidationCause(const char *invalidation_reason);
 
-extern bool SlotExistsInStandbySlotNames(const char *slot_name);
+extern bool SlotExistsInSyncStandbySlots(const char *slot_name);
 extern bool StandbySlotsHaveCaughtup(XLogRecPtr wait_for_lsn, int elevel);
 extern void WaitForStandbyConfirmation(XLogRecPtr wait_for_lsn);
 
diff --git a/src/include/replication/walsender_private.h b/src/include/replication/walsender_private.h
index 109924ffcd..cf32ac2488 100644
--- a/src/include/replication/walsender_private.h
+++ b/src/include/replication/walsender_private.h
@@ -115,8 +115,8 @@ typedef struct
 
 	/*
 	 * Used by physical walsenders holding slots specified in
-	 * standby_slot_names to wake up logical walsenders holding logical
-	 * failover slots when a walreceiver confirms the receipt of LSN.
+	 * synchronized_standby_slots to wake up logical walsenders holding
+	 * logical failover slots when a walreceiver confirms the receipt of LSN.
 	 */
 	ConditionVariable wal_confirm_rcv_cv;
 
diff --git a/src/include/utils/guc_hooks.h b/src/include/utils/guc_hooks.h
index d64dc5fcdb..070d3f2a1a 100644
--- a/src/include/utils/guc_hooks.h
+++ b/src/include/utils/guc_hooks.h
@@ -174,8 +174,8 @@ extern bool check_wal_consistency_checking(char **newval, void **extra,
 extern void assign_wal_consistency_checking(const char *newval, void *extra);
 extern bool check_wal_segment_size(int *newval, void **extra, GucSource source);
 extern void assign_wal_sync_method(int new_wal_sync_method, void *extra);
-extern bool check_standby_slot_names(char **newval, void **extra,
-									 GucSource source);
-extern void assign_standby_slot_names(const char *newval, void *extra);
+extern bool check_synchronized_standby_slots(char **newval, void **extra,
+											 GucSource source);
+extern void assign_synchronized_standby_slots(const char *newval, void *extra);
 
 #endif							/* GUC_HOOKS_H */
diff --git a/src/test/recovery/t/040_standby_failover_slots_sync.pl b/src/test/recovery/t/040_standby_failover_slots_sync.pl
index 3b6dddba71..2c51cfc3c8 100644
--- a/src/test/recovery/t/040_standby_failover_slots_sync.pl
+++ b/src/test/recovery/t/040_standby_failover_slots_sync.pl
@@ -598,7 +598,7 @@ ok( $standby1->poll_query_until(
 #				| ----> subscriber1 (failover = true, slot_name = lsub1_slot)
 #				| ----> subscriber2 (failover = false, slot_name = lsub2_slot)
 #
-# standby_slot_names = 'sb1_slot'
+# synchronized_standby_slots = 'sb1_slot'
 #
 # The setup is configured in such a way that the logical slot of subscriber1 is
 # enabled for failover, and thus the subscriber1 will wait for the physical
@@ -629,7 +629,7 @@ $primary->wait_for_replay_catchup($standby2);
 # from getting ahead of the specified physical replication slot (sb1_slot).
 $primary->append_conf(
 	'postgresql.conf', qq(
-standby_slot_names = 'sb1_slot'
+synchronized_standby_slots = 'sb1_slot'
 ));
 $primary->reload;
 
@@ -678,11 +678,11 @@ is($result, 't', "subscriber2 gets data from primary");
 # Wait until the primary server logs a warning indicating that it is waiting
 # for the sb1_slot to catch up.
 $primary->wait_for_log(
-	qr/replication slot \"sb1_slot\" specified in parameter standby_slot_names does not have active_pid/,
+	qr/replication slot \"sb1_slot\" specified in parameter synchronized_standby_slots does not have active_pid/,
 	$offset);
 
 # The regress_mysub1 was enabled for failover so it doesn't get the data from
-# primary and keeps waiting for the standby specified in standby_slot_names
+# primary and keeps waiting for the standby specified in synchronized_standby_slots
 # (sb1_slot aka standby1).
 $result =
   $subscriber1->safe_psql('postgres',
@@ -691,7 +691,7 @@ is($result, 't',
 	"subscriber1 doesn't get data from primary until standby1 acknowledges changes"
 );
 
-# Start the standby specified in standby_slot_names (sb1_slot aka standby1) and
+# Start the standby specified in synchronized_standby_slots (sb1_slot aka standby1) and
 # wait for it to catch up with the primary.
 $standby1->start;
 $primary->wait_for_replay_catchup($standby1);
@@ -699,7 +699,7 @@ $result = $standby1->safe_psql('postgres',
 	"SELECT count(*) = $primary_row_count FROM tab_int;");
 is($result, 't', "standby1 gets data from primary");
 
-# Now that the standby specified in standby_slot_names is up and running, the
+# Now that the standby specified in synchronized_standby_slots is up and running, the
 # primary can send the decoded changes to the subscription enabled for failover
 # (i.e. regress_mysub1). While the standby was down, regress_mysub1 didn't
 # receive any data from the primary. i.e. the primary didn't allow it to go
@@ -713,13 +713,13 @@ is($result, 't',
 ##################################################
 # Verify that when using pg_logical_slot_get_changes to consume changes from a
 # logical failover slot, it will also wait for the slots specified in
-# standby_slot_names to catch up.
+# synchronized_standby_slots to catch up.
 ##################################################
 
 # Stop the standby associated with the specified physical replication slot so
 # that the logical replication slot won't receive changes until the standby
 # slot's restart_lsn is advanced or the slot is removed from the
-# standby_slot_names list.
+# synchronized_standby_slots list.
 $primary->safe_psql('postgres', "TRUNCATE tab_int;");
 $primary->wait_for_catchup('regress_mysub1');
 $standby1->stop;
@@ -757,15 +757,15 @@ $back_q->query_until(
 # Wait until the primary server logs a warning indicating that it is waiting
 # for the sb1_slot to catch up.
 $primary->wait_for_log(
-	qr/replication slot \"sb1_slot\" specified in parameter standby_slot_names does not have active_pid/,
+	qr/replication slot \"sb1_slot\" specified in parameter synchronized_standby_slots does not have active_pid/,
 	$offset);
 
-# Remove the standby from the standby_slot_names list and reload the
+# Remove the standby from the synchronized_standby_slots list and reload the
 # configuration.
-$primary->adjust_conf('postgresql.conf', 'standby_slot_names', "''");
+$primary->adjust_conf('postgresql.conf', 'synchronized_standby_slots', "''");
 $primary->reload;
 
-# Since there are no slots in standby_slot_names, the function
+# Since there are no slots in synchronized_standby_slots, the function
 # pg_logical_slot_get_changes should now return, and the session can be
 # stopped.
 $back_q->quit;
@@ -773,9 +773,10 @@ $back_q->quit;
 $primary->safe_psql('postgres',
 	"SELECT pg_drop_replication_slot('test_slot');");
 
-# Add the physical slot (sb1_slot) back to the standby_slot_names for further
+# Add the physical slot (sb1_slot) back to the synchronized_standby_slots for further
 # tests.
-$primary->adjust_conf('postgresql.conf', 'standby_slot_names', "'sb1_slot'");
+$primary->adjust_conf('postgresql.conf', 'synchronized_standby_slots',
+	"'sb1_slot'");
 $primary->reload;
 
 # Enable the regress_mysub1 for further tests
@@ -784,7 +785,7 @@ $subscriber1->safe_psql('postgres',
 
 ##################################################
 # Test that logical replication will wait for the user-created inactive
-# physical slot to catch up until we remove the slot from standby_slot_names.
+# physical slot to catch up until we remove the slot from synchronized_standby_slots.
 ##################################################
 
 $offset = -s $primary->logfile;
@@ -797,33 +798,34 @@ $primary->safe_psql('postgres',
 # Wait until the primary server logs a warning indicating that it is waiting
 # for the sb1_slot to catch up.
 $primary->wait_for_log(
-	qr/replication slot \"sb1_slot\" specified in parameter standby_slot_names does not have active_pid/,
+	qr/replication slot \"sb1_slot\" specified in parameter synchronized_standby_slots does not have active_pid/,
 	$offset);
 
 # The regress_mysub1 doesn't get the data from primary because the specified
-# standby slot (sb1_slot) in standby_slot_names is inactive.
+# standby slot (sb1_slot) in synchronized_standby_slots is inactive.
 $result =
   $subscriber1->safe_psql('postgres', "SELECT count(*) = 0 FROM tab_int;");
 is($result, 't',
 	"subscriber1 doesn't get data as the sb1_slot doesn't catch up");
 
-# Remove the standby from the standby_slot_names list and reload the
+# Remove the standby from the synchronized_standby_slots list and reload the
 # configuration.
-$primary->adjust_conf('postgresql.conf', 'standby_slot_names', "''");
+$primary->adjust_conf('postgresql.conf', 'synchronized_standby_slots', "''");
 $primary->reload;
 
-# Since there are no slots in standby_slot_names, the primary server should now
+# Since there are no slots in synchronized_standby_slots, the primary server should now
 # send the decoded changes to the subscription.
 $primary->wait_for_catchup('regress_mysub1');
 $result = $subscriber1->safe_psql('postgres',
 	"SELECT count(*) = $primary_row_count FROM tab_int;");
 is($result, 't',
-	"subscriber1 gets data from primary after standby1 is removed from the standby_slot_names list"
+	"subscriber1 gets data from primary after standby1 is removed from the synchronized_standby_slots list"
 );
 
-# Add the physical slot (sb1_slot) back to the standby_slot_names for further
+# Add the physical slot (sb1_slot) back to the synchronized_standby_slots for further
 # tests.
-$primary->adjust_conf('postgresql.conf', 'standby_slot_names', "'sb1_slot'");
+$primary->adjust_conf('postgresql.conf', 'synchronized_standby_slots',
+	"'sb1_slot'");
 $primary->reload;
 
 ##################################################
diff --git a/src/tools/pgindent/typedefs.list b/src/tools/pgindent/typedefs.list
index 61ad417cde..a8b97f0122 100644
--- a/src/tools/pgindent/typedefs.list
+++ b/src/tools/pgindent/typedefs.list
@@ -2717,7 +2717,6 @@ SplitPoint
 SplitTextOutputData
 SplitVar
 StackElem
-StandbySlotNamesConfigData
 StartDataPtrType
 StartLOPtrType
 StartLOsPtrType
@@ -2782,6 +2781,7 @@ SyncRepConfigData
 SyncRepStandbyData
 SyncRequestHandler
 SyncRequestType
+SyncStandbySlotsConfigData
 SyncingTablesState
 SysFKRelationship
 SysScanDesc
-- 
2.30.0.windows.2

#25Bertrand Drouvot
bertranddrouvot.pg@gmail.com
In reply to: Zhijie Hou (Fujitsu) (#24)
Re: New standby_slot_names GUC in PG 17

Hi,

On Wed, Jun 26, 2024 at 09:15:48AM +0000, Zhijie Hou (Fujitsu) wrote:

Renamed these to the names suggested by Amit.

Attach the v2 patch set which addressed above and removed
the changes in release-17.sgml according to the comment from Amit.

Thanks! LGTM.

Regards,

--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com

#26Amit Kapila
amit.kapila16@gmail.com
In reply to: Bertrand Drouvot (#25)
Re: New standby_slot_names GUC in PG 17

On Wed, Jun 26, 2024 at 6:00 PM Bertrand Drouvot
<bertranddrouvot.pg@gmail.com> wrote:

On Wed, Jun 26, 2024 at 09:15:48AM +0000, Zhijie Hou (Fujitsu) wrote:

Renamed these to the names suggested by Amit.

Attach the v2 patch set which addressed above and removed
the changes in release-17.sgml according to the comment from Amit.

Thanks! LGTM.

As per my reading of this thread, we have an agreement on changing the
GUC name standby_slot_names to synchronized_standby_slots. I'll wait
for a day and push the change unless someone thinks otherwise.

--
With Regards,
Amit Kapila.

#27Peter Eisentraut
peter@eisentraut.org
In reply to: Bruce Momjian (#1)
Re: New standby_slot_names GUC in PG 17

On 21.06.24 17:37, Bruce Momjian wrote:

The release notes have this item:

Allow specification of physical standbys that must be synchronized
before they are visible to subscribers (Hou Zhijie, Shveta Malik)

The new server variable is standby_slot_names.

Is standby_slot_names an accurate name for this GUC? It seems too
generic.

This was possibly inspired by pg_failover_slots.standby_slot_names
(which in turn came from pglogical.standby_slot_names). In those cases,
you have some more context from the extension prefix.

The new suggested names sound good to me.

#28Masahiko Sawada
sawada.mshk@gmail.com
In reply to: Zhijie Hou (Fujitsu) (#24)
Re: New standby_slot_names GUC in PG 17

On Wed, Jun 26, 2024 at 6:15 PM Zhijie Hou (Fujitsu)
<houzj.fnst@fujitsu.com> wrote:

On Wednesday, June 26, 2024 12:49 PM Bertrand Drouvot <bertranddrouvot.pg@gmail.com> wrote:

Hi,

On Wed, Jun 26, 2024 at 04:17:45AM +0000, Zhijie Hou (Fujitsu) wrote:

On Wednesday, June 26, 2024 9:40 AM Masahiko Sawada

<sawada.mshk@gmail.com> wrote:

On Tue, Jun 25, 2024 at 5:32 PM Amit Kapila
<amit.kapila16@gmail.com>
wrote:

I feel synchronized better indicates the purpose because we ensure
such slots are synchronized before we process changes for logical
failover slots. We already have a 'failover' option for logical
slots which could make things confusing if we add 'failover' where
physical slots need to be specified.

Agreed. So +1 for synchronized_stnadby_slots.

+1.

Since there is a consensus on this name, I am attaching the patch to
rename the GUC to synchronized_stnadby_slots. I have confirmed that
the regression tests and pgindent passed for the patch.

A few comments:

Thanks for the comments!

1 ====

In the commit message:

"
The standby_slot_names GUC is intended to allow specification of physical
standby slots that must be synchronized before they are visible to
subscribers
"

Not sure that wording is correct, if we feel the need to explain the GUC, maybe
repeat some wording from bf279ddd1c?

I intentionally copied some words from release note of this GUC which was
also part of the content in the initial email of this thread. I think it
would be easy to understand than the original commit msg. But others may
have different opinion, so I would leave the decision to the committer. (I adjusted
a bit the word in this version).

2 ====

Should we rename StandbySlotNamesConfigData too?

3 ====

Should we rename SlotExistsInStandbySlotNames too?

4 ====

Should we rename validate_standby_slots() too?

Renamed these to the names suggested by Amit.

Attach the v2 patch set which addressed above and removed
the changes in release-17.sgml according to the comment from Amit.

Thank you for updating the patch. The v2 patch looks good to me.

Regards,

--
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com

#29Amit Kapila
amit.kapila16@gmail.com
In reply to: Masahiko Sawada (#28)
Re: New standby_slot_names GUC in PG 17

On Thu, Jun 27, 2024 at 7:14 AM Masahiko Sawada <sawada.mshk@gmail.com> wrote:

On Wed, Jun 26, 2024 at 6:15 PM Zhijie Hou (Fujitsu)
<houzj.fnst@fujitsu.com> wrote:

Thank you for updating the patch. The v2 patch looks good to me.

Pushed.

--
With Regards,
Amit Kapila.

#30Zhijie Hou (Fujitsu)
houzj.fnst@fujitsu.com
In reply to: Amit Kapila (#29)
1 attachment(s)
RE: New standby_slot_names GUC in PG 17

On Monday, July 1, 2024 6:45 PM Amit Kapila <amit.kapila16@gmail.com> wrote:

On Thu, Jun 27, 2024 at 7:14 AM Masahiko Sawada
<sawada.mshk@gmail.com> wrote:

On Wed, Jun 26, 2024 at 6:15 PM Zhijie Hou (Fujitsu)
<houzj.fnst@fujitsu.com> wrote:

Thank you for updating the patch. The v2 patch looks good to me.

Pushed.

Thanks! I am attaching another patch to modify the release note as discussed.

Best Regards,
Hou zj

Attachments:

0001-add-recent-renaming-commit-to-the-release-note.patchapplication/octet-stream; name=0001-add-recent-renaming-commit-to-the-release-note.patchDownload
From 063fcddbf8db9bf5e12b8e4e18ba062a9e87dac6 Mon Sep 17 00:00:00 2001
From: Hou Zhijie <houzj.fnst@cn.fujitsu.com>
Date: Mon, 1 Jul 2024 20:09:04 +0800
Subject: [PATCH] add recent renaming commit to the release note

---
 doc/src/sgml/release-17.sgml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/doc/src/sgml/release-17.sgml b/doc/src/sgml/release-17.sgml
index be0532e554..47956d5133 100644
--- a/doc/src/sgml/release-17.sgml
+++ b/doc/src/sgml/release-17.sgml
@@ -1341,6 +1341,8 @@ Author: Michael Paquier <michael@paquier.xyz>
 <!--
 Author: Amit Kapila <akapila@postgresql.org>
 2024-03-08 [bf279ddd1] Introduce a new GUC 'standby_slot_names'.
+Author: Amit Kapila <akapila@postgresql.org>
+2024-07-01 [0f934b073] Rename standby_slot_names to synchronized_standby_slots.
 -->
 
       <listitem>
-- 
2.30.0.windows.2

#31Amit Kapila
amit.kapila16@gmail.com
In reply to: Zhijie Hou (Fujitsu) (#30)
Re: New standby_slot_names GUC in PG 17

On Mon, Jul 1, 2024 at 6:01 PM Zhijie Hou (Fujitsu)
<houzj.fnst@fujitsu.com> wrote:

Thanks! I am attaching another patch to modify the release note as discussed.

Pushed.

--
With Regards,
Amit Kapila.