PostgreSQL 12, released on October 3, 2019, will not start if the old recovery.conf file is present. The release moves recovery settings into postgresql.conf and uses separate signal files to select recovery or standby mode. For database teams upgrading standby provisioning and restore jobs, deleting the obsolete file is only part of the work: the settings and the choice of operating mode both need to survive the change. [S1][S4]

A standby now starts with a standby.signal file in its data directory; the standby_mode setting has been removed. According to the version 12 configuration reference, the server keeps trying to recover after it reaches the end of archived write-ahead log (WAL) records. It can connect to the sending server using primary_conninfo and/or fetch new log segments using restore_command. The signal file selects the mode; it does not replace those connection and retrieval settings. [S4][S5]

A targeted restore uses recovery.signal instead, with the end of the archived WAL or the configured recovery target as its stopping point. If both recovery.signal and standby.signal exist, standby mode takes precedence. A restore rehearsal should inspect which signal files the provisioning job actually creates, rather than infer the mode from the job’s name. [S5]

PostgreSQL 12 also renames trigger_file to promote_trigger_file, which names a file whose presence ends recovery in a standby. Teams using a file-based promotion script need to update the configuration name as well as preserve the intended trigger path. The manual says that pg_ctl promote and the pg_promote function can promote the standby even when promote_trigger_file is not set. [S4][S5]

Recovery targets have a stricter rule. Version 12 permits at most one of recovery_target, recovery_target_lsn, recovery_target_name, recovery_target_time or recovery_target_xid. Combining different target parameters now raises an error; earlier releases honored the last one specified. Repeated assignments to the same parameter still use its last value. A template that carries both a named restore point and a time target can no longer use their order to decide which one wins. [S4][S5]

PostgreSQL 12 changes the default recovery_target_timeline from current to latest. The manual defines current as the timeline that was current when the base backup was taken; latest follows the newest timeline found in the archive. It also permits an explicit numeric timeline ID. Restore jobs that depended on the old default therefore need an explicit timeline choice. [S4][S5]

Source documents

  1. PostgreSQL 12 Released!https://www.postgresql.org/about/news/postgresql-12-released-1976/
  2. PostgreSQL 12 release notes — REL_12_0 sourcehttps://raw.githubusercontent.com/postgres/postgres/ad1f2885b8c82e0c2d56d7974f012cbecce17a17/doc/src/sgml/release-12.sgml
  3. PostgreSQL 12 server configuration — REL_12_0 sourcehttps://raw.githubusercontent.com/postgres/postgres/ad1f2885b8c82e0c2d56d7974f012cbecce17a17/doc/src/sgml/config.sgml