A configuration file containing replication configuration parameters
This entry relates to a PostgreSQL feature which is deprecated and may be desupported in future releases.

recovery.conf is a simple configuration file placed in the top level of the data directory which is used with standby servers to specify the location of the primary server for streaming replication, or when starting up a server using archived WAL files, or performing PITR.

recovery.conf was added in PostgreSQL 8.0 and removed in PostgreSQL 12.

As a file for configuring streaming replication, its name is somewhat counterintuitive, but makes sense from the historical development of PostgreSQL's replication methods. It might be an idea to think of streaming replication standbys as "permanently in recovery".


Note that in contrast to other directly editable configuration files, recovery.conf cannot be relocated outside of the data directory.

If a standby is promoted, recovery.conf is renamed to recovery.done.


recovery.conf is processed by src/backend/access/transam/xlog.c (PostgreSQL 11 and earlier).


From PostgreSQL 12, recovery.conf is replaced by a simple file (standby.signal) which initiates recovery, while the settings it contained have become normal configuration parameters.

Change history


A sample recovery.conf file is included in the source code at src/backend/access/transam/recovery.conf.sample, though it does not contain all possible parameters.


Configuration, Deprecated, Replication