logical decoding
The PostgreSQL feature that turns write-ahead log entries into readable row changes, such as inserts and updates with their values.
In more detail
It requires wal_level set to logical, a replication slot and an output plugin that decides the format. Change data capture tools are built on it.
Related terms
- write-ahead log — The log where PostgreSQL records every change before applying it to the data files, so it can recover after a crash.
- replication slot — A PostgreSQL object that remembers how far a consumer of the change stream has read, so no changes are lost between reads.
- test_decoding — An example logical decoding output plugin shipped with PostgreSQL that prints each change as a line of readable text.
- change data capture — Reading every insert, update and delete from a database's own change log and turning them into a stream of events.
Taught in
- Change Data Capture In Principle — Apache Kafka & Event Streaming