standby.signal

A file determining whether a node starts up as a standby

standby.signal is an optional data directory file determining whether the node starts up as a standby.

standby.signal was added in PostgreSQL 12, replacing the replication configuration parameter standby_mode.

Usage

If the file standby.signal is present in the data directory, the server will start in standby mode and enter recovery.

The standby.signal can be empty, or contain arbitrary data (for example, a replication management tool could write information noting details about when/how the standby was created).

Note that if standby.signal is present, but neither primary_conninfo nor restore_command are specified, the server will start up in recovery and wait for WAL files to be placed in the pg_wal directory by an external process:

[2021-05-12 08:36:12 UTC]    WARNING:  01000: specified neither primary_conninfo nor restore_command
[2021-05-12 08:36:12 UTC]    HINT:  The database server will regularly poll the pg_wal subdirectory to check for files placed there.

If both standby.signal and recovery.signal are present in the data directory, standby.signal takes precedence. This situation is not logged.

Change history

Categories

Data directory, Replication

See also

recovery.signal