Re: libpq: Bump protocol version to version 3.2 at least until the first/second beta

From: Andres Freund <andres(at)anarazel(dot)de>
To: Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>
Cc: Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: Re: libpq: Bump protocol version to version 3.2 at least until the first/second beta
Date: 2025-11-03 14:59:21
Message-ID: hoyzuae4eugcnofactgxsi4tw5olcumdmytl2o6fxwwamfujhr@26aulxfhj37o
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2025-11-03 15:46:10 +0100, Jelte Fennema-Nio wrote:
> From 31851ddff8cb40f732aac0bfac364da61ed9fa30 Mon Sep 17 00:00:00 2001
> From: Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>
> Date: Thu, 23 Oct 2025 15:08:52 +0200
> Subject: [PATCH v3 2/2] libpq: Request protocol version 3.9999 to GREASE the
> ecosystem
>
> The main reason that libpq does not request protocol version 3.2 by
> default is because other proxy/server implementations don't implement
> the negotiation. This is a bit of a chicken and egg problem: We don't
> bump the default version that libpq asks, but proxies will only
> implement version negotiation when their users run into issues.

> This patch defines 3.999 as an explicitly unsupported protocol version
> number and _pq_.test_protocol_negotiation as an explicitly unsupported
> protocol extension. It also starts requesting that version and protocol
> extension by default. This change to the default will be reverted before
> we release PG19 release candidates (when exactly to revert before that
> time is TBD). The intent is to stress test the ecosystem for
> servers/middleware that don't support protocol version negotiation, so
> that those servers/middleware can implement the negotiation. This is
> similar to the GREASE[1] mechanism that TLS has.
>
> It's still possible for users to connect to servers that don't support
> protocol negotiation by using max_protocol_version=3.0 in their
> connection string. Only the default connection behaviour is impacted.
>
> [1]: https://www.rfc-editor.org/rfc/rfc8701.html

Won't this mean that it'll be harder to performance comparisons between the
in-development version and other versions? Because there will be negotiation
before we branch of 19, but not after and not in release branches?

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Álvaro Herrera 2025-11-03 14:59:31 Re: fix NOT VALID NOT NULL with ALTER COLUMN SET IDENTITY
Previous Message Jelte Fennema-Nio 2025-11-03 14:46:10 Re: libpq: Bump protocol version to version 3.2 at least until the first/second beta