Skip to content

pg_slotcontrol

Legacy SQL control of physical replication slot retention positions

pg_slotsync · Legacy SQL control of physical replication slot retention positions

Overview

IDExtensionPackageVersionCategoryLicenseLanguage
102102pg_slotcontrolpg_slotsync1.0ADMINPostgreSQLC

Usage

Sources:

pg_slotcontrol exposes pg_slotmove(text, pg_lsn) to move a physical replication slot retention position forward. This is a 2017 source snapshot; current PostgreSQL compatibility is not established.

Core Workflow

CREATE EXTENSION pg_slotcontrol;
SELECT slot_name, slot_type, restart_lsn FROM pg_replication_slots;
SELECT pg_slotmove('physical_standby', '1/86000100'::pg_lsn);

Operational Boundaries

Only move a slot after ensuring required WAL exists elsewhere. The C implementation rejects logical slots, caps the target at the current WAL write position and never moves backwards. The boolean result indicates whether the position changed. Installation requires a superuser; PUBLIC execution is revoked, so delegate the function deliberately. No preload is specified. The separate pg_slotsync program is not installed by creating this extension.

Table reader