Skip to content
pg_failover_slots

pg_failover_slots

pg_failover_slots : PG Failover Slots extension

Overview

IDExtensionPackageVersionCategoryLicenseLanguage
9540
pg_failover_slots
pg_failover_slots
1.2.1
ETL
PostgreSQL
C
AttributeHas BinaryHas LibraryNeed LoadHas DDLRelocatableTrusted
--sL--r
No
Yes
Yes
No
yes
no
Relationships
See Also
pglogical
pglogical_origin
pglogical_ticker
pgactive
repmgr
bgw_replstatus
pgl_ddl_deploy
decoderbufs

Load via shared_preload_libraries on both primary and standby nodes.

Packages

TypeRepoVersionPG Major CompatibilityPackage PatternDependencies
EXT
PIGSTY
1.2.1
18
17
16
15
14
pg_failover_slots-
RPM
PIGSTY
1.2.1
18
17
16
15
14
pg_failover_slots_$v-
DEB
PIGSTY
1.2.1
18
17
16
15
14
postgresql-$v-pg-failover-slots-
Linux / PGPG18PG17PG16PG15PG14
el8.x86_64
PIGSTY 1.2.1
PIGSTY 1.2.1
PIGSTY 1.2.1
PIGSTY 1.2.1
PIGSTY 1.2.1
el8.aarch64
PIGSTY 1.2.1
PIGSTY 1.2.1
PIGSTY 1.2.1
PIGSTY 1.2.1
PIGSTY 1.2.1
el9.x86_64
PIGSTY 1.2.1
PIGSTY 1.2.1
PIGSTY 1.2.1
PIGSTY 1.2.1
PIGSTY 1.2.1
el9.aarch64
PIGSTY 1.2.1
PIGSTY 1.2.1
PIGSTY 1.2.1
PIGSTY 1.2.1
PIGSTY 1.2.1
el10.x86_64
PIGSTY 1.2.1
PIGSTY 1.2.1
PIGSTY 1.2.1
PIGSTY 1.2.1
PIGSTY 1.2.1
el10.aarch64
PIGSTY 1.2.1
PIGSTY 1.2.1
PIGSTY 1.2.1
PIGSTY 1.2.1
PIGSTY 1.2.1
d12.x86_64
PGDG 1.2.1
PGDG 1.2.1
PGDG 1.2.1
PGDG 1.2.1
PGDG 1.2.1
d12.aarch64
PGDG 1.2.1
PGDG 1.2.1
PGDG 1.2.1
PGDG 1.2.1
PGDG 1.2.1
d13.x86_64
PGDG 1.2.1
PGDG 1.2.1
PGDG 1.2.1
PGDG 1.2.1
PGDG 1.2.1
d13.aarch64
PGDG 1.2.1
PGDG 1.2.1
PGDG 1.2.1
PGDG 1.2.1
PGDG 1.2.1
u22.x86_64
PGDG 1.2.1
PGDG 1.2.1
PGDG 1.2.1
PGDG 1.2.1
PGDG 1.2.1
u22.aarch64
PGDG 1.2.1
PGDG 1.2.1
PGDG 1.2.1
PGDG 1.2.1
PGDG 1.2.1
u24.x86_64
PGDG 1.2.1
PGDG 1.2.1
PGDG 1.2.1
PGDG 1.2.1
PGDG 1.2.1
u24.aarch64
PGDG 1.2.1
PGDG 1.2.1
PGDG 1.2.1
PGDG 1.2.1
PGDG 1.2.1
u26.x86_64
PGDG 1.2.1
PGDG 1.2.1
PGDG 1.2.1
PGDG 1.2.1
PGDG 1.2.1
u26.aarch64
PGDG 1.2.1
PGDG 1.2.1
PGDG 1.2.1
PGDG 1.2.1
PGDG 1.2.1
PackageVersionOSORGSIZEFile URL
pg_failover_slots_181.2.1el8.x86_64pigsty24.6 KiBpg_failover_slots_18-1.2.1-1PIGSTY.el8.x86_64.rpm
pg_failover_slots_181.2.0el8.x86_64pgdg24.7 KiBpg_failover_slots_18-1.2.0-1PGDG.rhel8.x86_64.rpm
pg_failover_slots_181.2.1el8.aarch64pigsty24.3 KiBpg_failover_slots_18-1.2.1-1PIGSTY.el8.aarch64.rpm
pg_failover_slots_181.2.0el8.aarch64pgdg24.2 KiBpg_failover_slots_18-1.2.0-1PGDG.rhel8.aarch64.rpm
pg_failover_slots_181.2.1el9.x86_64pigsty24.8 KiBpg_failover_slots_18-1.2.1-1PIGSTY.el9.x86_64.rpm
pg_failover_slots_181.2.0el9.x86_64pgdg24.7 KiBpg_failover_slots_18-1.2.0-1PGDG.rhel9.x86_64.rpm
pg_failover_slots_181.2.1el9.aarch64pigsty24.9 KiBpg_failover_slots_18-1.2.1-1PIGSTY.el9.aarch64.rpm
pg_failover_slots_181.2.0el9.aarch64pgdg24.3 KiBpg_failover_slots_18-1.2.0-1PGDG.rhel9.aarch64.rpm
pg_failover_slots_181.2.1el10.x86_64pigsty25.2 KiBpg_failover_slots_18-1.2.1-1PIGSTY.el10.x86_64.rpm
pg_failover_slots_181.2.0el10.x86_64pgdg25.5 KiBpg_failover_slots_18-1.2.0-1PGDG.rhel10.x86_64.rpm
pg_failover_slots_181.2.1el10.aarch64pigsty25.3 KiBpg_failover_slots_18-1.2.1-1PIGSTY.el10.aarch64.rpm
pg_failover_slots_181.2.0el10.aarch64pgdg25.1 KiBpg_failover_slots_18-1.2.0-1PGDG.rhel10.aarch64.rpm
postgresql-18-pg-failover-slots1.2.1d12.x86_64pgdg39.5 KiBpostgresql-18-pg-failover-slots_1.2.1-1.pgdg12+1_amd64.deb
postgresql-18-pg-failover-slots1.2.1d12.x86_64pigsty38.4 KiBpostgresql-18-pg-failover-slots_1.2.1-1PIGSTY~bookworm_amd64.deb
postgresql-18-pg-failover-slots1.2.0d12.x86_64pgdg39.3 KiBpostgresql-18-pg-failover-slots_1.2.0-1.pgdg12+1_amd64.deb
postgresql-18-pg-failover-slots1.2.1d12.aarch64pgdg38.8 KiBpostgresql-18-pg-failover-slots_1.2.1-1.pgdg12+1_arm64.deb
postgresql-18-pg-failover-slots1.2.1d12.aarch64pigsty37.8 KiBpostgresql-18-pg-failover-slots_1.2.1-1PIGSTY~bookworm_arm64.deb
postgresql-18-pg-failover-slots1.2.0d12.aarch64pgdg38.7 KiBpostgresql-18-pg-failover-slots_1.2.0-1.pgdg12+1_arm64.deb
postgresql-18-pg-failover-slots1.2.1d13.x86_64pgdg39.7 KiBpostgresql-18-pg-failover-slots_1.2.1-1.pgdg13+1_amd64.deb
postgresql-18-pg-failover-slots1.2.1d13.x86_64pigsty38.7 KiBpostgresql-18-pg-failover-slots_1.2.1-1PIGSTY~trixie_amd64.deb
postgresql-18-pg-failover-slots1.2.0d13.x86_64pgdg39.8 KiBpostgresql-18-pg-failover-slots_1.2.0-1.pgdg13+1_amd64.deb
postgresql-18-pg-failover-slots1.2.1d13.aarch64pgdg38.9 KiBpostgresql-18-pg-failover-slots_1.2.1-1.pgdg13+1_arm64.deb
postgresql-18-pg-failover-slots1.2.1d13.aarch64pigsty38.0 KiBpostgresql-18-pg-failover-slots_1.2.1-1PIGSTY~trixie_arm64.deb
postgresql-18-pg-failover-slots1.2.0d13.aarch64pgdg38.9 KiBpostgresql-18-pg-failover-slots_1.2.0-1.pgdg13+1_arm64.deb
postgresql-18-pg-failover-slots1.2.1u22.x86_64pgdg40.1 KiBpostgresql-18-pg-failover-slots_1.2.1-1.pgdg22.04+1_amd64.deb
postgresql-18-pg-failover-slots1.2.1u22.x86_64pigsty41.5 KiBpostgresql-18-pg-failover-slots_1.2.1-1PIGSTY~jammy_amd64.deb
postgresql-18-pg-failover-slots1.2.0u22.x86_64pgdg39.9 KiBpostgresql-18-pg-failover-slots_1.2.0-1.pgdg22.04+1_amd64.deb
postgresql-18-pg-failover-slots1.2.1u22.aarch64pgdg38.9 KiBpostgresql-18-pg-failover-slots_1.2.1-1.pgdg22.04+1_arm64.deb
postgresql-18-pg-failover-slots1.2.1u22.aarch64pigsty40.6 KiBpostgresql-18-pg-failover-slots_1.2.1-1PIGSTY~jammy_arm64.deb
postgresql-18-pg-failover-slots1.2.0u22.aarch64pgdg38.8 KiBpostgresql-18-pg-failover-slots_1.2.0-1.pgdg22.04+1_arm64.deb
postgresql-18-pg-failover-slots1.2.1u24.x86_64pgdg39.6 KiBpostgresql-18-pg-failover-slots_1.2.1-1.pgdg24.04+1_amd64.deb
postgresql-18-pg-failover-slots1.2.1u24.x86_64pigsty40.5 KiBpostgresql-18-pg-failover-slots_1.2.1-1PIGSTY~noble_amd64.deb
postgresql-18-pg-failover-slots1.2.0u24.x86_64pgdg39.6 KiBpostgresql-18-pg-failover-slots_1.2.0-1.pgdg24.04+1_amd64.deb
postgresql-18-pg-failover-slots1.2.1u24.aarch64pgdg38.8 KiBpostgresql-18-pg-failover-slots_1.2.1-1.pgdg24.04+1_arm64.deb
postgresql-18-pg-failover-slots1.2.1u24.aarch64pigsty39.8 KiBpostgresql-18-pg-failover-slots_1.2.1-1PIGSTY~noble_arm64.deb
postgresql-18-pg-failover-slots1.2.0u24.aarch64pgdg38.8 KiBpostgresql-18-pg-failover-slots_1.2.0-1.pgdg24.04+1_arm64.deb
postgresql-18-pg-failover-slots1.2.1u26.x86_64pgdg39.3 KiBpostgresql-18-pg-failover-slots_1.2.1-1.pgdg26.04+1_amd64.deb
postgresql-18-pg-failover-slots1.2.1u26.x86_64pigsty39.9 KiBpostgresql-18-pg-failover-slots_1.2.1-1PIGSTY~resolute_amd64.deb
postgresql-18-pg-failover-slots1.2.0u26.x86_64pgdg39.2 KiBpostgresql-18-pg-failover-slots_1.2.0-1.pgdg26.04+1_amd64.deb
postgresql-18-pg-failover-slots1.2.1u26.aarch64pgdg38.3 KiBpostgresql-18-pg-failover-slots_1.2.1-1.pgdg26.04+1_arm64.deb
postgresql-18-pg-failover-slots1.2.1u26.aarch64pigsty39.3 KiBpostgresql-18-pg-failover-slots_1.2.1-1PIGSTY~resolute_arm64.deb
postgresql-18-pg-failover-slots1.2.0u26.aarch64pgdg38.2 KiBpostgresql-18-pg-failover-slots_1.2.0-1.pgdg26.04+1_arm64.deb

Source

pig build pkg pg_failover_slots;		# build rpm/deb

Install

Make sure PGDG and PIGSTY repo available:

pig repo add pgsql -u   # add both repo and update cache

Install this extension with pig:

pig install pg_failover_slots;		# install via package name, for the active PG version

pig install pg_failover_slots -v 18;   # install for PG 18
pig install pg_failover_slots -v 17;   # install for PG 17
pig install pg_failover_slots -v 16;   # install for PG 16
pig install pg_failover_slots -v 15;   # install for PG 15
pig install pg_failover_slots -v 14;   # install for PG 14

Config this extension to shared_preload_libraries:

shared_preload_libraries = 'pg_failover_slots';

This extension does not need CREATE EXTENSION DDL command

Usage

Sources: README, releases

pg_failover_slots keeps logical replication slots usable across failover by synchronizing slot definitions and positions from a primary to a standby.

Enable it on both nodes

shared_preload_libraries = 'pg_failover_slots'

Required standby settings from the README:

hot_standby_feedback = on
primary_slot_name = 'my_physical_slot'

Main configuration

pg_failover_slots.synchronize_slot_names = 'name_like:%'
pg_failover_slots.drop_extra_slots = true
pg_failover_slots.primary_dsn = 'host=primary dbname=mydb'
pg_failover_slots.standby_slot_names = 'standby_physical_slot'
pg_failover_slots.standby_slots_min_confirmed = -1
pg_failover_slots.worker_nap_time = 60000
pg_failover_slots.maintenance_db = 'postgres'

The README documents synchronize_slot_names filters by exact slot name, LIKE pattern, or plugin name.

Check standby readiness before failover

SELECT slot_name, active
FROM pg_replication_slots
WHERE slot_type = 'logical';

On the standby, logical slots are ready only when they exist and show active = false. The README says active = true means a slot is still being initialized.

Notes

  • PostgreSQL 11+ is required upstream.
  • v1.2.1 is a bug-fix release; no new user-facing SQL or GUC surface was added there.
  • v1.2.0 added PostgreSQL 18 support and clarified drop_extra_slots behavior.
Last updated on