primary_conninfo

A configuration parameter specifying the upstream server for a standby to connect to

primary_conninfo is a configuration parameter specifying the upstream server for a streaming replication standby to connect to.

Note that despite what the name implies, since the introduction of cascading replication in PostgreSQL 9.2, the specified server can be another standby.

primary_conninfo was added in PostgreSQL 9.0.

Usage

Current setting

The current setting for primary_conninfo (as used by the walreceiver) is contained in the conninfo column of the system view pg_stat_wal_receiver (PostgreSQL 9.6 and later). Note however that the conninfo column will also contain any libpq default conninfo parameters.

PostgreSQL 13 and later

In PostgreSQL 13 and later, primary_conninfo is handled as a normal GUC and can be set in postgresql.conf or modified via ALTER SYSTEM. A change requires a configuration reload to take effect.

PostgreSQL 12

In PostgreSQL 12, primary_conninfo is handled as a normal GUC and can be set in postgresql.conf or modified via ALTER SYSTEM. A change requires a restart of the PostgreSQL instance to take effect.

PostgreSQL 11 and earlier

In PostgreSQL 11 and earlier, primary_conninfo is specified in recovery.conf; a change requires a restart of the PostgreSQL instance to take effect.

Change history

Categories

GUC configuration item, Replication

See also

primary_slot_name, pg_stat_wal_receiver, recovery.conf