Alper Sarı

PostgreSQL 16 Logical Replication from a Standby: Move Read Work Carefully

PostgreSQL 16 allows logical replication to originate from a standby server. That can move some logical decoding work away from the primary, which is attractive when a system publishes changes to analytics, search, or downstream services. It is a topology option, not a free read replica that removes operational responsibility.

The publishing standby still needs the right configuration and capacity. Logical decoding reads changes from WAL, so retention and slot health matter. A consumer that falls behind can retain WAL and consume storage. Monitor replication lag, slot state, WAL growth, and the standby’s recovery behavior. A standby restart, promotion, or failover plan must account for how the logical consumer resumes.

Before switching a publication to a standby, confirm the exact version requirements and limitations in the versioned documentation. Test initial table synchronization separately from ongoing change delivery. Make sure subscribers can tolerate duplicate delivery or replay according to the replication contract, and verify that downstream processing is idempotent where appropriate.

Use this architecture when moving decode work off the primary has a clear operational payoff. If the primary is not constrained, the added topology may cost more in monitoring and failover complexity than it saves. A replica is not automatically a backup, and logical replication is not a substitute for tested point-in-time recovery.

PostgreSQL 16 lists logical replication from standby servers among its release features. Start with the release notes and the logical decoding documentation for configuration details.