# Note that recovery.conf must be in $PGDATA directory. # Specifies whether to start the server as a standby. In streaming replication, # this parameter must to be set to on. standby_mode = 'on' # Specifies a connection string which is used for the standby server to connect # with the primary. primary_conninfo = 'host=db-postgres.service.consul port=5432 user=postgres' # Specifies a trigger file whose presence should cause streaming replication to # end (i.e., failover). trigger_file = '/var/lib/postgresql/11/main/standby.trigger' # Specifies a command to load archive segments from the WAL archive. If # wal_keep_segments is a high enough number to retain the WAL segments # required for the standby server, this may not be necessary. But # a large workload can cause segments to be recycled before the standby # is fully synchronized, requiring you to start again from a new base backup. restore_command = 'rsync -a db-postgres.service.consul:/var/lib/postgresql/13/archive/%f "%p"'