RE: Doc: fix the note related to the GUC "synchronized_standby_slots" - Mailing list pgsql-hackers

From Zhijie Hou (Fujitsu)
Subject RE: Doc: fix the note related to the GUC "synchronized_standby_slots"
Date
Msg-id OS3PR01MB5718D2135AC96ACCDCA4A21A948B2@OS3PR01MB5718.jpnprd01.prod.outlook.com
Whole thread Raw
In response to Re: Doc: fix the note related to the GUC "synchronized_standby_slots"  (Amit Kapila <amit.kapila16@gmail.com>)
Responses Re: Doc: fix the note related to the GUC "synchronized_standby_slots"
List pgsql-hackers
On Monday, August 26, 2024 5:37 PM Amit Kapila <amit.kapila16@gmail.com> wrote:
> 
> On Mon, Aug 26, 2024 at 1:30 PM <Masahiro.Ikeda@nttdata.com> wrote:
> >
> > When I read the following documentation related to the
> "synchronized_standby_slots", I misunderstood that data loss would not occur
> in the case of synchronous physical replication. However, this is incorrect (see
> reproduce.txt).
> >
> > > Note that in the case of asynchronous replication, there remains a risk of
> data loss for transactions committed on the former primary server but have yet
> to be replicated to the new primary server.
> > https://www.postgresql.org/docs/17/logical-replication-failover.html
> >
> > Am I missing something?
> >
> 
> It seems part of the paragraph: "Note that in the case of asynchronous
> replication, there remains a risk of data loss for transactions committed on the
> former primary server but have yet to be replicated to the new primary server." is
> a bit confusing. Will it make things clear to me if we remove that part?

I think the intention is to address a complaint[1] that the date inserted on
primary after the primary disconnects with the standby is still lost after
failover. But after rethinking, maybe it's doesn't directly belong to the topic in
the logical failover section because it's a general fact for async replication.
If we think it matters, maybe we can remove this part and slightly modify
another part:

   parameter ensures a seamless transition of those subscriptions after the
   standby is promoted. They can continue subscribing to publications on the
-   new primary server without losing data.
+   new primary server without losing that has already been replicated and
+    flushed on the standby server.

[1] https://www.postgresql.org/message-id/ZfRe2%2BOxMS0kvNvx%40ip-10-97-1-34.eu-west-3.compute.internal

Best Regards,
Hou zj

pgsql-hackers by date:

Previous
From: "Wetmore, Matthew (CTR)"
Date:
Subject: Re: Non-trivial condition is only propagated to one side of JOIN
Next
From: Joe Conway
Date:
Subject: Re: how to log into commitfest.postgresql.org and begin review patch