Re: pg_copy_logical_replication_slot doesn't copy the failover property
Amit Kapila <amit.kapila16@gmail.com>
From: Amit Kapila <amit.kapila16@gmail.com>
To: Shlok Kyal <shlok.kyal.oss@gmail.com>
Cc: Masahiko Sawada <sawada.mshk@gmail.com>,
Nisha Moond <nisha.moond412@gmail.com>, duffieldzane@gmail.com, pgsql-docs@lists.postgresql.org
Date: 2025-02-24T02:46:20Z
Lists: pgsql-hackers, pgsql-docs
On Sat, Feb 22, 2025 at 11:26 AM Shlok Kyal <shlok.kyal.oss@gmail.com> wrote: > > Adding Amit to the thread. > Thanks. Looking at the original complaint: > It says > * To avoid potential issues with the slot synchronization where the > * restart_lsn of a replication slot can go backward, we set the > * failover option to false here. This situation occurs when a slot > * on the primary server is dropped and immediately replaced with a > * new slot of the same name, created by copying from another existing > * slot. However, the slot synchronization will only observe the > * restart_lsn of the same slot going backward. It would be better to update the comments as well to make the potential issues with slot synchronization clear or mention the reference of other place where we have comments related to this race condition. Also, I think it is better to write about two_phase in the comments as well as in docs unless already mentioned. If you agree with updating the comments as well, shall we redirect this to hackers? > > > > IIUC the two_phase field is also not copied from the source slot. I > > think we can clarify in the doc that these two fields are not copied. > > +1. -- With Regards, Amit Kapila.
Commits
-
Doc: Fix pg_copy_logical_replication_slot description.
- 5b8f2ccc0a93 18.0 landed
- 7c906c5b46f8 17.5 landed
-
Add option to enable two_phase commits via pg_create_logical_replication_slot.
- 19890a064ebf 14.0 cited