<varlistentry id="libpq-keepalives-idle" xreflabel="keepalives_idle">
<term><literal>keepalives_idle</literal></term>
<listitem>
<para>
Controls the number of seconds of inactivity after which TCP should
send a keepalive message to the server. A value of zero uses the
system default. This parameter is ignored for connections made via a
Unix-domain socket, or if keepalives are disabled.
It is only supported on systems where <symbol>TCP_KEEPIDLE</symbol> or
an equivalent socket option is available, and on Windows; on other
systems, it has no effect.
</para>
</listitem>
</varlistentry>
<varlistentry id="libpq-keepalives-interval" xreflabel="keepalives_interval">
<term><literal>keepalives_interval</literal></term>
<listitem>
<para>
Controls the number of seconds after which a TCP keepalive message
that is not acknowledged by the server should be retransmitted. A
value of zero uses the system default. This parameter is ignored for
connections made via a Unix-domain socket, or if keepalives are disabled.
It is only supported on systems where <symbol>TCP_KEEPINTVL</symbol> or
an equivalent socket option is available, and on Windows; on other
systems, it has no effect.
</para>
</listitem>
</varlistentry>
<varlistentry id="libpq-keepalives-count" xreflabel="keepalives_count">
<term><literal>keepalives_count</literal></term>
<listitem>
<para>
Controls the number of TCP keepalives that can be lost before the
client's connection to the server is considered dead. A value of
zero uses the system default. This parameter is ignored for
connections made via a Unix-domain socket, or if keepalives are disabled.
It is only supported on systems where <symbol>TCP_KEEPCNT</symbol> or
an equivalent socket option is available; on other systems, it has no
effect.
</para>
</listitem>
</varlistentry>
<varlistentry id="libpq-tcp-user-timeout" xreflabel="tcp_user_timeout">
<term><literal>tcp_user_timeout</literal></term>
<listitem>
<para>
Controls the number of milliseconds that transmitted data may
remain unacknowledged before a connection is forcibly closed.
A value of zero uses the system default. This parameter is
ignored for connections made via a Unix-domain socket.
It is only supported on systems where <symbol>TCP_USER_TIMEOUT</symbol>
is available; on other systems, it has no effect.
</para>
</listitem>
</varlistentry>
<varlistentry id="libpq-connect-replication" xreflabel="replication">
<term><literal>replication</literal></term>
<listitem>
<para>
This option determines whether the connection should use the
replication protocol instead of the normal protocol. This is what
PostgreSQL replication connections as well as tools such as
<application>pg_basebackup</application> use internally, but it can
also be used by third-party applications. For a description of the
replication protocol, consult <xref linkend="protocol-replication"/>.
</para>
<para>
The following values, which are case-insensitive, are supported:
<variablelist>
<varlistentry>
<term>
<literal>true</literal>, <literal>on</literal>,
<literal>yes</literal>, <literal>1</literal>
</term>
<listitem>
<para>
The connection goes into physical replication mode.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>database</literal></term>
<listitem>
<para>
The connection goes into logical replication mode, connecting to
the database specified in the <literal>dbname</literal>