select open change scope Open full search

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

FUNCTIONS / SYSTEM ADMINISTRATION FUNCTIONS

pg_replication_slot_advance

Read PG 18 manual ↗

Advances the current confirmed position of a replication slot named slot_name.

Signatures & examples

pg_replication_slot_advance ( slot_name name, upto_lsn pg_lsn ) → record ( slot_name name, end_lsn pg_lsn )
Advances the current confirmed position of a replication slot named slot_name. The slot will not be moved backwards, and it will not be moved beyond the current insert location. Returns the name of the slot and the actual position that it was advanced to. The updated slot position information is written out at the next checkpoint if any advancing is done. So in the event of a crash, the slot may return to an earlier position. If the specified slot is a logical failover slot then the function will not return until all physical slots specified in synchronized_standby_slots have confirmed WAL receipt.
Version history 3
  1. PG 16 → 17changed
  2. PG 12 → 13changed
  3. PG 10 → 11added

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