Home Explore Blog CI



postgresql

31th chunk of `doc/src/sgml/libpq.sgml`
7c6a452eb02346568c9d7c3e7d64ebf760fa43c1f14acc550000000100000fa6
 id="libpq-connect-min-protocol-version" xreflabel="min_protocol_version">
      <term><literal>min_protocol_version</literal></term>
      <listitem>
       <para>
        Specifies the minimum protocol version to allow for the connection.
        The default is to allow any version of the
        <productname>PostgreSQL</productname> protocol supported by libpq,
        which currently means <literal>3.0</literal>. If the server
        does not support at least this protocol version the connection will be
        closed.
       </para>

       <para>
        The current supported values are
        <literal>3.0</literal>, <literal>3.2</literal>,
        and <literal>latest</literal>. The <literal>latest</literal> value is
        equivalent to the latest protocol version supported by the libpq
        version being used, which is currently <literal>3.2</literal>.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry id="libpq-connect-max-protocol-version" xreflabel="max_protocol_version">
      <term><literal>max_protocol_version</literal></term>
      <listitem>
       <para>
        Specifies the protocol version to request from the server.
        The default is to use version <literal>3.0</literal> of the
        <productname>PostgreSQL</productname> protocol, unless the connection
        string specifies a feature that relies on a higher protocol version,
        in which case the latest version supported by libpq is used. If the
        server does not support the protocol version requested by the client,
        the connection is automatically downgraded to a lower minor protocol
        version that the server supports. After the connection attempt has
        completed you can use <xref linkend="libpq-PQprotocolVersion"/> to
        find out which exact protocol version was negotiated.
       </para>

       <para>
        The current supported values are
        <literal>3.0</literal>, <literal>3.2</literal>,
        and <literal>latest</literal>. The <literal>latest</literal> value is
        equivalent to the latest protocol version supported by the libpq
        version being used, which is currently <literal>3.2</literal>.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry id="libpq-connect-ssl-max-protocol-version" xreflabel="ssl_max_protocol_version">
      <term><literal>ssl_max_protocol_version</literal></term>
      <listitem>
       <para>
        This parameter specifies the maximum SSL/TLS protocol version to allow
        for the connection. Valid values are <literal>TLSv1</literal>,
        <literal>TLSv1.1</literal>, <literal>TLSv1.2</literal> and
        <literal>TLSv1.3</literal>. The supported protocols depend on the
        version of <productname>OpenSSL</productname> used, older versions
        not supporting the most modern protocol versions. If not set, this
        parameter is ignored and the connection will use the maximum bound
        defined by the backend, if set. Setting the maximum protocol version
        is mainly useful for testing or if some component has issues working
        with a newer protocol.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry id="libpq-connect-krbsrvname" xreflabel="krbsrvname">
      <term><literal>krbsrvname</literal></term>
      <listitem>
       <para>
        Kerberos service name to use when authenticating with GSSAPI.
        This must match the service name specified in the server
        configuration for Kerberos authentication to succeed. (See also
        <xref linkend="gssapi-auth"/>.)
        The default value is normally <literal>postgres</literal>,
        but that can be changed when
        building <productname>PostgreSQL</productname> via
        the <option>--with-krb-srvnam</option> option
        of <application>configure</application>.
        In most environments, this parameter never needs to be changed.
        Some Kerberos implementations might require a different

Title: Connection Parameters: Protocol Versions and Kerberos Service Name
Summary
This section details parameters for setting maximum PostgreSQL protocol version ('max_protocol_version'), maximum SSL/TLS protocol version ('ssl_max_protocol_version') and Kerberos service name ('krbsrvname') in libpq. 'max_protocol_version' allows specifying the highest PostgreSQL protocol version to request (defaulting to 3.0). 'ssl_max_protocol_version' sets the maximum allowable SSL/TLS protocol, useful for testing or compatibility. 'krbsrvname' specifies the Kerberos service name for GSSAPI authentication, typically 'postgres'.