Logical decoding
Logical decoding reconstructs database changes from a storage-level log into a representation that a consumer can interpret without the database's physical storage format.
PostgreSQL uses output plugins to translate WAL into change streams. A logical slot serves one database and has its own progress state. [1] A disconnected slot can retain system-catalog row versions needed for decoding, so monitoring only retained WAL misses part of its resource footprint. [1]
For PostgreSQL 16 built-in logical replication, serial/identity column values travel with table rows but their sequence state does not. A writable-subscriber switchover therefore needs a separate allocator check. This restriction is not a statement about physical WAL replication, and pg_dump --data-only has a different documented scope that includes sequence values. [3] [4]
Relations
- related
- Replication slot, Write-ahead log, Log sequence number, Idempotency, Logical failover slot, Hot standby feedback, PostgreSQL sequence
Limitations
- After a crash, checkpointed slot progress can rewind and recent changes can be delivered again; consumers must prevent duplicate effects. [1]
Citations
- PostgreSQL 18: logical decoding concepts and crash replay
- PostgreSQL 16: logical replication restrictions, sequence state
- PostgreSQL 16: pg_dump, data-only scope includes sequence values