pgsql: Provide for forward compatibility with future minor protocolver - Mailing list pgsql-committers

From Robert Haas
Subject pgsql: Provide for forward compatibility with future minor protocolver
Date
Msg-id E1eHEWB-0005Q3-4N@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Provide for forward compatibility with future minor protocol versions.

Previously, any attempt to request a 3.x protocol version other than
3.0 would lead to a hard connection failure, which made the minor
protocol version really no different from the major protocol version
and precluded gentle protocol version breaks.  Instead, when the
client requests a 3.x protocol version where x is greater than 0, send
the new NegotiateProtocolVersion message to convey that we support
only 3.0.  This makes it possible to introduce new minor protocol
versions without requiring a connection retry when the server is
older.

In addition, if the startup packet includes name/value pairs where
the name starts with "_pq_.", assume that those are protocol options,
not GUCs.  Include those we don't support (i.e. all of them, at
present) in the NegotiateProtocolVersion message so that the client
knows they were not understood.  This makes it possible for the
client to request previously-unsupported features without bumping
the protocol version at all; the client can tell from the server's
response whether the option was understood.

It will take some time before servers that support these new
facilities become common in the wild; to speed things up and make
things easier for a future 3.1 protocol version, back-patch to all
supported releases.

Robert Haas and Badrul Chowdhury

Discussion: http://postgr.es/m/BN6PR21MB0772FFA0CBD298B76017744CD1730@BN6PR21MB0772.namprd21.prod.outlook.com
Discussion: http://postgr.es/m/30788.1498672033@sss.pgh.pa.us

Branch
------
REL9_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/c703aa6258997d22ca7338bc221c31ff83feefb7

Modified Files
--------------
doc/src/sgml/protocol.sgml          | 116 ++++++++++++++++++++++++++++++++----
src/backend/postmaster/postmaster.c |  58 ++++++++++++++++--
2 files changed, 158 insertions(+), 16 deletions(-)


pgsql-committers by date:

Previous
From: Robert Haas
Date:
Subject: pgsql: Fix multiple problems with satisfies_hash_partition.
Next
From: Tom Lane
Date:
Subject: pgsql: Doc: fix broken markup.