Wiki / Configuration Parameters
primary_conninfo
Specifies a connection string to be used for the standby server to connect with a sending server. This string is in the format described in Section 32.1.1. If any option is unspecified in this string, then the corresponding environment variable (see Section 32.15) is checked. If the environment variable is not set either, then defaults are used. The connection string should specify the host name (or address) of the sending server, as well as the port number if it is not the same as the standby server's default. Also specify a user name corresponding to a suitably-privileged role on the sending server (see Section 26.2.5.1). A password needs to be provided too, if the sender demands password authentication. It can be provided in the primary_conninfo string, or in a separate ~/.pgpass file on the standby server (use replication as the database name). For replication slot synchronization (see Section 47.2.3), it is also necessary to specify a valid dbname in the primary_conninfo string. This will only be used for slot synchronization. It is ignored for streaming. This parameter can only be set in the postgresql.conf file or on the server command line. If this parameter is changed while the WAL receiver process is running, that process is signaled to shut down and expected to restart with the new setting (except if primary_conninfo is an empty string). This setting has no effect if the server is not in standby mode.
English manual coverage begins with PostgreSQL 7.4. Source history and runtime observations have their own recorded version boundaries.
Reading PG 18·Select a recorded version
- boot val
- Unknown
- category
- Replication / Standby Servers
- context
- sighup
- doc same as
- Unknown
- documented
- true
- enumvals
- Unknown
- extra desc
- Unknown
- lang
- en
- max val
- Unknown
- metadata version
- 18
- min val
- Unknown
- name
- primary_conninfo
- short desc
- Sets the connection string to be used to connect to the sending server.
- source
- pg-settings-source-snapshot
- unit
- Unknown
- vartype
- string
Definition PG 18
Specifies a connection string to be used for the standby server to connect with a sending server. This string is in the format described in Section 32.1.1. If any option is unspecified in this string, then the corresponding environment variable (see Section 32.15) is checked. If the environment variable is not set either, then defaults are used.
The connection string should specify the host name (or address)
of the sending server, as well as the port number if it is not
the same as the standby server's default.
Also specify a user name corresponding to a suitably-privileged role
on the sending server (see
Section 26.2.5.1).
A password needs to be provided too, if the sender demands password
authentication. It can be provided in the
primary_conninfo string, or in a separate
~/.pgpass file on the standby server (use
replication as the database name).
For replication slot synchronization (see
Section 47.2.3),
it is also necessary to specify a valid dbname
in the primary_conninfo string. This will only be
used for slot synchronization. It is ignored for streaming.
This parameter can only be set in the postgresql.conf
file or on the server command line.
If this parameter is changed while the WAL receiver process is
running, that process is signaled to shut down and expected to
restart with the new setting (except if primary_conninfo
is an empty string).
This setting has no effect if the server is not in standby mode.
Compare versions
Complete source facts
doc html
<p>
Specifies a connection string to be used for the standby server
to connect with a sending server. This string is in the format
described in <a class="xref" href="/docs/18/libpq-connect.html#LIBPQ-CONNSTRING" title="32.1.1. Connection Strings">Section 32.1.1</a>. If any option is
unspecified in this string, then the corresponding environment
variable (see <a class="xref" href="/docs/18/libpq-envars.html" title="32.15. Environment Variables">Section 32.15</a>) is checked. If the
environment variable is not set either, then
defaults are used.
</p><p>
The connection string should specify the host name (or address)
of the sending server, as well as the port number if it is not
the same as the standby server's default.
Also specify a user name corresponding to a suitably-privileged role
on the sending server (see
<a class="xref" href="/docs/18/warm-standby.html#STREAMING-REPLICATION-AUTHENTICATION" title="26.2.5.1. Authentication">Section 26.2.5.1</a>).
A password needs to be provided too, if the sender demands password
authentication. It can be provided in the
<code class="varname">primary_conninfo</code> string, or in a separate
<code class="filename">~/.pgpass</code> file on the standby server (use
<code class="literal">replication</code> as the database name).
</p><p>
For replication slot synchronization (see
<a class="xref" href="/docs/18/logicaldecoding-explanation.html#LOGICALDECODING-REPLICATION-SLOTS-SYNCHRONIZATION" title="47.2.3. Replication Slot Synchronization">Section 47.2.3</a>),
it is also necessary to specify a valid <code class="literal">dbname</code>
in the <code class="varname">primary_conninfo</code> string. This will only be
used for slot synchronization. It is ignored for streaming.
</p><p>
This parameter can only be set in the <code class="filename">postgresql.conf</code>
file or on the server command line.
If this parameter is changed while the WAL receiver process is
running, that process is signaled to shut down and expected to
restart with the new setting (except if <code class="varname">primary_conninfo</code>
is an empty string).
This setting has no effect if the server is not in standby mode.
</p>documentation revision
{"inputs":[{"file":"runtime-config-replication.html","kind":"same-version-reviewed-manual","locale":"en","sha256":"c0b8bd86131ec62d4df97ce480d004aa7e3544477d053f0c2d4047b9edad5cc0","version":"18.7"},{"file":"runtime-config-replication.html","kind":"same-version-reviewed-manual","locale":"zh-Hans","sha256":"83907b5f469e979a7b9ec875b5e7bdaa2ef6b85596ca31b45174f68cd7398b18","version":"18.7"}],"release":"18.7","runtime_remeasured":false,"source_revision":"pgdoc:b9f0e7232f60f380d642ac9b99226606c254b552"}Source references
Full definition and evidence JSON
Definition sources
center · PostgreSQL 18 · wiki-repair-20261023:40f3549855cbfff7f053a2ef23c344ea0d6f89072e7478e2af30512583985f68
Text language: en · wiki-repair-20261023:40f3549855cbfff7f053a2ef23c344ea0d6f89072e7478e2af30512583985f68