DB Internals AtlasPostgreSQL 18.6 Home About

Parameter · Write-Ahead Log / Recovery Target

recovery_target_action

Sets the action to perform upon reaching the recovery target.

  • Default: pause
  • Type: enum
  • Values: pause · promote · shutdown
  • Applies: Restart required

In plain words

When recovery reaches the target, PostgreSQL can pause (default; you can look at the data read-only and decide), promote (finish recovery and open for writes), or shut down (stop, so you can copy the data directory or adjust the target).

For DBAs and operators

  • pause: needs hot_standby = on to be useful (otherwise it behaves like shutdown). Inspect, then SELECT pg_wal_replay_resume(); to promote; if the point is wrong, stop, change the target to a later one and restart: replay continues. Log: LOG: pausing at the end of recoveryHINT: Execute pg_wal_replay_resume() to promote.
  • promote: ends recovery immediately, creates a new timeline, and the server accepts writes.
  • shutdown: stops at the target. recovery.signal is left in place, so the next start replays to the same target and shuts down again until you change the config or remove the file.

No effect without a recovery target. If the archive ends before the target is reached, the server stops with FATAL: recovery ended before configured recovery target was reached

How to change it

Change in postgresql.conf or ALTER SYSTEM, then restart the server.

See it in context

Archiving and point-in-time recovery Startup process

Related parameters

recovery_target_time recovery_target hot_standby recovery_end_command

All Write-Ahead Log parameters