[pgpool-hackers: 2749] Deal with NegotiateProtocolVersion message

Tatsuo Ishii ishii at sraoss.co.jp
Thu Mar 22 09:42:00 JST 2018

PostgreSQL 10.2, 9.6.7, 9.5.11, 9.4.16 and 9.3.21 added a new backend
message in PostgreSQL's Frontend/Backend protocol.

>From the release note:
 Provide for forward compatibility with future minor protocol versions
 (Robert Haas, Badrul Chowdhury)

Up to now, PostgreSQL servers simply rejected requests to use protocol
versions newer than 3.0, so that there was no functional difference
between the major and minor parts of the protocol version
number. Allow clients to request versions 3.x without failing, sending
back a message showing that the server only understands 3.0. This
makes no difference at the moment, but back-patching this change
should allow speedier introduction of future minor protocol upgrades.

The new message is called "NegotiateProtocolVersion" and explained here:



    The server does not support the minor protocol version requested
    by the client, but does support an earlier version of the
    protocol; this message indicates the highest supported minor
    version. This message will also be sent if the client requested
    unsupported protocol options (i.e. beginning with _pq_.) in the
    startup packet. This message will be followed by an ErrorResponse
    or a message indicating the success or failure of authentication.

The message for is explained here:


NegotiateProtocolVersion (B)


        Identifies the message as a protocol version negotiation


        Length of message contents in bytes, including self.


        Newest minor protocol version supported by the server for the
        major protocol version requested by the client.


        Number of protocol options not recognized by the server.

    Then, for protocol option not recognized by the server, there is
    the following:


        The option name.

For now there's no client driver which supports this as far as I know
(even libpq does not support this at this moment). So I think
Pgpool-II does not need to dealt with this as soon as possible.

Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php

More information about the pgpool-hackers mailing list