IT lexicon Database Logical replication

Logical replication

Database På svenska → Updated: 2026-07-30

Replication at the row level (INSERT/UPDATE/DELETE events) instead of the block level — you can replicate selected tables, across different versions, or into non-Postgres systems.

In Postgres since v10 (2017). Built on WAL decoding via a logical replication slot — an output plugin (pgoutput, wal2json) translates WAL records into logical events. Publication/subscription are the user-facing abstractions.

Use cases: zero-downtime major-version upgrades, CDC out to Kafka via Debezium, multi-master via pglogical, blue-green database swaps. Cost: ~10–20 % CPU overhead on the primary, can lag under massive transactions.

← Back to the lexicon