Replication

recovery_min_apply_delay

Also called: apply delay setting

recovery_min_apply_delay is the standby setting that creates a delayed standby. It tells the startup process to wait until a transaction's commit timestamp plus this interval has passed before applying that commit's WAL. The logic lives in recoveryApplyDelay() and keys off the timestamps carried in commit records.

What this means

The single setting that turns a standby into a delayed one. It tells the replica: don't apply a committed change until its commit time plus this interval has passed. Set it to one hour and every change lands on this replica exactly one hour late.

Why it matters operationally

It sets the size of your operator-error undo window. Bigger means more time to react to a mistake, but staler reads on that replica and more WAL to retain. Don't combine it with synchronous_commit = remote_apply, which would stall every commit on the primary by the full delay.

Related & next

Cascading replication and delayed standbys explainedDelayed standby, what this setting producesWAL, what gets received now and applied later

Mentioned from

← All glossary terms · GUC reference · Error catalog