pg_copy_logical_replication_slot doesn't copy the failover property - Mailing list pgsql-docs

From PG Doc comments form
Subject pg_copy_logical_replication_slot doesn't copy the failover property
Date
Msg-id 173976850802.682632.11315364077431550250@wrigleys.postgresql.org
Whole thread Raw
List pgsql-docs
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/17/functions-admin.html
Description:

The documentation for pg_copy_logical_replication_slot doesn't mention that
the failover property for the logical slot is not copied.

I assumed there was a good reason for this, and I found a comment in the
source code that explains it (although I don't really understand).
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.

I assumed that by default, all properties from the original slot would be
copied, so this function left me wondering why my logical replication slots
were not being synced to the replica.

pgsql-docs by date:

Previous
From: Robert Treat
Date:
Subject: Re: Minor suggestions for docs regarding json_table
Next
From: PG Doc comments form
Date:
Subject: Threading issue / maybe just doc issue.