RefLib

Reference library for AI

Back

postgresql_16:4.12.2.3 Preparing the Primary for Standby Servers

PostgreSQL 16 > Server Administration > High Availability, Load Balancing, and Replication > Log-Shipping Standby Servers > Preparing the Primary for Standby Servers

Set up continuous archiving on the primary to an archive directory accessible from the standby, as described in (see postgresql_16:4.11.3). The archive location should be accessible from the standby even when the primary is down, i.e., it should reside on the standby server itself or another trusted server, not on the primary server.

If you want to use streaming replication, set up authentication on the primary server to allow replication connections from the standby server(s); that is, create a role and provide a suitable entry or entries in pg_hba.conf with the database field set to replication. Also ensure max_wal_senders is set to a sufficiently large value in the configuration file of the primary server. If replication slots will be used, ensure that max_replication_slots is set sufficiently high as well.

Take a base backup as described in (see postgresql_16:4.11.3.2) to bootstrap the standby server.

Back