Re: synchronized_standby_slots behavior inconsistent with quorum-based synchronous replication

Ashutosh Sharma <ashu.coek88@gmail.com>

From: Ashutosh Sharma <ashu.coek88@gmail.com>
To: Shlok Kyal <shlok.kyal.oss@gmail.com>
Cc: shveta malik <shveta.malik@gmail.com>, Amit Kapila <amit.kapila16@gmail.com>, "Zhijie Hou (Fujitsu)" <houzj.fnst@fujitsu.com>, Ajin Cherian <itsajin@gmail.com>, SATYANARAYANA NARLAPURAM <satyanarlapuram@gmail.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2026-06-15T10:39:26Z
Lists: pgsql-hackers

Attachments

Hi Shlok,

Thanks for reviewing the patch and sharing your feedback - all your
comments are well noted. Please find my responses below.

On Fri, Jun 12, 2026 at 6:33 PM Shlok Kyal <shlok.kyal.oss@gmail.com> wrote:
>
> Hi Ashutosh,
>
> I have reviewed the patches. Here are some comments:
>
> 1. Should we update the doc for function "pg_logical_slot_get_changes". It says:
> ```
> If the specified slot is a logical failover slot then the function will
> not return until all physical slots specified in
> <link linkend="guc-synchronized-standby-slots"><varname>synchronized_standby_slots</varname></link>
> have confirmed WAL receipt.
> ```
> This line "return until all physical slots specified in" seems wrong
> after introduction of "FIRST/ANY"
>

Agreed, it indeed needs correction, it has been addressed in the attached patch.

> 2. Similarly, should we update the doc for function
> "pg_replication_slot_advance"? It also says:
> ```
> If the specified slot is a
> logical failover slot then the function will not return until all
> physical slots specified in
> <link linkend="guc-synchronized-standby-slots"><varname>synchronized_standby_slots</varname></link>
> have confirmed WAL receipt.
> ```

Same as comment 1, this has been corrected in the attached patch as well

>
> 3. Comment in syncrep_gram.y states:
>  * syncrep_gram.y - Parser for synchronous_standby_names
>
> Since synchronosed_standby_slots is reusing this, should we update this comment?
>

Agreed, update was due. This has been taken care of in the attached patch.

> 4. Similarly for syncrep_scanner.l, we have comment:
>  * syncrep_scanner.l
>  *   a lexical scanner for synchronous_standby_names
>
>  Should we update it?

Agreed and updated in the attached patch.

>
> 5. enum "SyncStandbySlotsState" and stuct "SyncStandbySlotsStateInfo" should be
> mentioned in typedefs.list, so that pgindent works properly.
>

These have been added to the typdefs.list

PFA attached patches with all these changes.

--
With Regards,
Ashutosh Sharma