Re: synchronized_standby_slots behavior inconsistent with quorum-based synchronous replication - Mailing list pgsql-hackers

From Ashutosh Sharma
Subject Re: synchronized_standby_slots behavior inconsistent with quorum-based synchronous replication
Date
Msg-id CAE9k0PkxvD_Rbz1qm3ZHOX_n-JXaOiPV2wusvb6KVwQqifpt6w@mail.gmail.com
Whole thread
Responses Re: synchronized_standby_slots behavior inconsistent with quorum-based synchronous replication
Re: synchronized_standby_slots behavior inconsistent with quorum-based synchronous replication
List pgsql-hackers
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

Attachment

pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Fix warning: ‘startpos’ may be used uninitialized in function ‘results_differ’
Next
From: Ashutosh Bapat
Date:
Subject: Re: [PATCH] proposal to surface index used by replica identity