pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Doc comments form <noreply@postgresql.org>
To: pgsql-docs@lists.postgresql.org
Cc: duffieldzane@gmail.com
Subject: pg_copy_logical_replication_slot doesn't copy the failover property
Date: Mon, 17 Feb 2025 05:01:48 +0000
Message-ID: <173976850802.682632.11315364077431550250@wrigleys.postgresql.org> (raw)

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.


view thread (9+ messages)  latest in thread

Message-ID: <173976850802.682632.11315364077431550250@wrigleys.postgresql.org>
Permalink:  ../173976850802.682632.11315364077431550250@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/173976850802.682632.11315364077431550250@wrigleys.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: noreply@postgresql.org, pgsql-docs@lists.postgresql.org, duffieldzane@gmail.com
  Subject: Re: pg_copy_logical_replication_slot doesn't copy the failover property
  In-Reply-To: <173976850802.682632.11315364077431550250@wrigleys.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox