select open change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

FUNCTIONS / SYSTEM ADMINISTRATION FUNCTIONS

pg_sync_replication_slots

Read PG 18 manual ↗

Synchronize the logical failover replication slots from the primary server to the standby server.

Signatures & examples

pg_sync_replication_slots () → void
Synchronize the logical failover replication slots from the primary server to the standby server. This function can only be executed on the standby server. Temporary synced slots, if any, cannot be used for logical decoding and must be dropped after promotion. See Section 47.2.3 for details. Note that this function is primarily intended for testing and debugging purposes and should be used with caution. Additionally, this function cannot be executed if sync_replication_slots is enabled and the slotsync worker is already running to perform the synchronization of slots.
Version history 2
  1. PG 18 → 19changed
  2. PG 16 → 17added

Definition snapshot: 2026-09-14T13:14:25.684213+00:00@99e6866c · English manual source