replication-slot · shipping · also PostgreSQL replication slot

Replication slot

In PostgreSQL, a replication slot tracks a consumer's progress and retains WAL and other resources needed for that consumer to continue.

Related Observatory article: Replication slot on hesela.com

Physical and logical slots serve different replication streams. Retention can outlive a disconnected consumer and exhaust WAL storage; the slot is not a synchronous-commit policy. [1] PostgreSQL 18 applies max_slot_wal_keep_size at checkpoints; -1 permits unlimited slot retention, while a finite limit can sacrifice required history. [2] The xmin and catalog_xmin horizons can hold back row-version cleanup independently of WAL byte headroom. [4]

Relations

related
asynchronous-replication, synchronous-replication, replication-lag, logical-decoding, write-ahead-log, wal-archiving

Limitations

Citations

  1. PostgreSQL 18: replication slots and WAL retention (accessed 2026-10-16)
  2. PostgreSQL 18: WAL retention limits and idle slot timeout (accessed 2026-10-16)
  3. Hesela: Replication acknowledgements, retention and decoding (accessed 2026-10-16)
  4. PostgreSQL 18: pg_replication_slots retention horizons (accessed 2026-10-16)
  5. PostgreSQL 18: routine vacuuming and transaction-ID wraparound prevention (accessed 2026-10-16)

JSON: /data/terms/replication-slot.json