← Back to Labs

Database Replication Pipeline

Walk one commit from primary WAL to standby receive, remote flush, replay, lag, and failover.

application clientcommit requestneeds a durable answerprimaryWAL head 0/16B4C120client already got COMMIT OK from primarylocal durability point lives here firststandby replicareceive: not receivedflush: not flushedreplay: old replay pointdurable bytes and visible rows can divergereplica reads and failoverreplica still returns the old row versionunsafe for zero-loss failoverstreamapply
Step 1 / 6The primary commits from its own WAL first

The write becomes durable on the primary when its WAL reaches disk. At this instant the standby still has no copy of the change, so asynchronous failover would still lose it.

Commit contract
async commit: wait for local flush only
Replica replay point
old replay point
Read behaviour
replica still returns the old row version

Arrow keys to navigate · R to reset

Tap dots to jump to any step

Read the full article →Take the quiz →