Home Explore Blog CI



postgresql

23th chunk of `doc/src/sgml/libpq.sgml`
de1577f3ebacb01c68cbad4d47c558c92d270aa1fdb796a70000000100000fa4
      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> parameter.
          </para>
         </listitem>
        </varlistentry>

        <varlistentry>
         <term>
          <literal>false</literal>, <literal>off</literal>,
          <literal>no</literal>, <literal>0</literal>
         </term>
         <listitem>
          <para>
           The connection is a regular one, which is the default behavior.
          </para>
         </listitem>
        </varlistentry>
       </variablelist>
      </para>

      <para>
       In physical or logical replication mode, only the simple query protocol
       can be used.
      </para>
      </listitem>
     </varlistentry>

     <varlistentry id="libpq-connect-gssencmode" xreflabel="gssencmode">
      <term><literal>gssencmode</literal></term>
      <listitem>
       <para>
        This option determines whether or with what priority a secure
        <acronym>GSS</acronym> TCP/IP connection will be negotiated with the
        server. There are three modes:

        <variablelist>
         <varlistentry>
          <term><literal>disable</literal></term>
          <listitem>
           <para>
            only try a non-<acronym>GSSAPI</acronym>-encrypted connection
           </para>
          </listitem>
         </varlistentry>

         <varlistentry>
          <term><literal>prefer</literal> (default)</term>
          <listitem>
           <para>
            if there are <acronym>GSSAPI</acronym> credentials present (i.e.,
            in a credentials cache), first try
            a <acronym>GSSAPI</acronym>-encrypted connection; if that fails or
            there are no credentials, try a
            non-<acronym>GSSAPI</acronym>-encrypted connection.  This is the
            default when <productname>PostgreSQL</productname> has been
            compiled with <acronym>GSSAPI</acronym> support.
           </para>
          </listitem>
         </varlistentry>

         <varlistentry>
          <term><literal>require</literal></term>
          <listitem>
           <para>
            only try a <acronym>GSSAPI</acronym>-encrypted connection
           </para>
          </listitem>
         </varlistentry>
        </variablelist>
       </para>

       <para>
        <literal>gssencmode</literal> is ignored for Unix domain socket
        communication.  If <productname>PostgreSQL</productname> is compiled
        without GSSAPI support, using the <literal>require</literal> option
        will cause an error, while <literal>prefer</literal> will be accepted
        but <application>libpq</application> will not actually attempt
        a <acronym>GSSAPI</acronym>-encrypted
        connection.<indexterm><primary>GSSAPI</primary><secondary sortas="libpq">with
        libpq</secondary></indexterm>
       </para>
      </listitem>
     </varlistentry>

     <varlistentry id="libpq-connect-sslmode" xreflabel="sslmode">
      <term><literal>sslmode</literal></term>
      <listitem>
       <para>
        This option determines whether or with what priority a secure

Title: Connection Parameters: Replication Mode and GSS Encryption
Summary
This section details the 'replication' and 'gssencmode' connection parameters. 'replication' specifies the connection's replication mode, with options for physical replication ('true', 'on', 'yes', '1'), logical replication ('database'), and regular connection ('false', 'off', 'no', '0'). When using physical or logical replication, only the simple query protocol is allowed. 'gssencmode' controls the negotiation of a secure GSSAPI TCP/IP connection, offering 'disable' (non-encrypted only), 'prefer' (try GSSAPI first, then non-encrypted), and 'require' (GSSAPI only) modes. GSSAPI encryption is ignored for Unix domain sockets, and using 'require' without GSSAPI support in PostgreSQL results in an error.