pg_copy_logical_replication_slot doesn't copy the failover property

From: PG Doc comments form <noreply(at)postgresql(dot)org>
To: pgsql-docs(at)lists(dot)postgresql(dot)org
Cc: duffieldzane(at)gmail(dot)com
Subject: pg_copy_logical_replication_slot doesn't copy the failover property
Date: 2025-02-17 05:01:48
Message-ID: 173976850802.682632.11315364077431550250@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-hackers

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.

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message PG Doc comments form 2025-02-17 21:38:32 Threading issue / maybe just doc issue.
Previous Message Robert Treat 2025-02-14 15:20:15 Re: Minor suggestions for docs regarding json_table

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Smith 2025-02-17 05:07:27 Re: Restrict copying of invalidated replication slots
Previous Message Thomas Munro 2025-02-17 04:55:09 Some read stream improvements