replication slot

A PostgreSQL object that remembers how far a consumer of the change stream has read, so no changes are lost between reads.

An unused slot keeps every write-ahead log file forever and can fill the database disk.

In more detail

The database keeps write-ahead log files until every slot has read past them, so a slot survives restarts. An abandoned slot therefore makes the log grow until the disk fills.

Example

SELECT * FROM pg_create_logical_replication_slot('m06l03_slot', 'test_decoding')

Related terms

Taught in

References