Replication lag
Replication lag is the elapsed delay between a change being applied or committed at a source and becoming applied or visible at a replication target.
PostgreSQL Mistakes and How to Avoid Them
Replication lag is the delay between a change being committed on a primary database server and being applied or visible on a replica.
- How it is used
- Frames replica-read and primary-write patterns as consistency and failover hazards.
- How deep it goes
- Explains stale-read consequences and WAL timeline divergence, while deferring detailed lag measurement and recovery procedures.
- Examples
- Uses a delayed standby account balance and promotion of a lagging replica after primary failure.
- What you can do after
- Evaluate/understand when stale replica reads or lagging promotion can violate consistency and recovery expectations.
Read how PostgreSQL Mistakes and How to Avoid Them explains replication lag →
MongoDB 8.0 in Action, Third Edition
Replication lag is the delay between an operation being recorded or applied on the primary and being applied on a replica.
- How it is used
- Monitors whether replicas keep pace with primary operations and helps diagnose replication problems.
- How deep it goes
- Explains topology-related causes and demonstrates status commands, but does not develop a formal lag calculation.
- Examples
- Uses db.getReplicationInfo() and db.printSecondaryReplicationInfo() outputs showing oplog timing and per-secondary lag.
- What you can do after
- Diagnose replication status with MongoDB shell commands and identify secondaries that trail the primary.
Read how MongoDB 8.0 in Action, Third Edition explains replication lag →
Related concepts
- alertingconfigured by · Alerting is the generation and delivery of notifications when monitored conditions or events meet defined criteria or require attention or action.
- asynchronous replicationcontrasts with · Asynchronous replication propagates data changes to replicas without requiring the primary operation to wait for replica confirmation.
- read replicationused by · Read replication is the replication of database data from a writable primary instance to one or more instances that serve read operations.
- synchronous replicationcontrasts with · Synchronous replication is a replication method in which an operation is acknowledged or completed only after required replicas have confirmed the change.
- performancekind of · Performance is the measurable effectiveness or operational behavior of a system under specified conditions, assessed through relevant qualities such as task results, speed, responsiveness, throughput, or resource use.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

