Re: Clarification on warning when connecting to 'pgbouncer' database via Pgbouncer - Mailing list pgsql-hackers

From David G. Johnston
Subject Re: Clarification on warning when connecting to 'pgbouncer' database via Pgbouncer
Date
Msg-id CAKFQuwb+vunKc_C_JngoLSKpk+Gcp8miK4Ogwt1KQE8FqFZsaQ@mail.gmail.com
Whole thread Raw
In response to Clarification on warning when connecting to 'pgbouncer' database via Pgbouncer  (Shaik Mohammad Mujeeb <mujeeb.sk@zohocorp.com>)
Responses Re: Clarification on warning when connecting to 'pgbouncer' database via Pgbouncer
List pgsql-hackers
On Tue, May 27, 2025 at 11:41 AM Shaik Mohammad Mujeeb <mujeeb.sk@zohocorp.com> wrote:
After the commit cf0cab868a, introduced in PG15, I noticed that when connecting to the 'pgbouncer' database via Pgbouncer, the following warning is shown:

psql (17.2, server 1.20.1/bouncer)
WARNING: psql major version 17, server major version 1.20.
         Some psql features might not work.


Is this an expected behaviour, or would it make sense to handle Pgbouncer differently in this check?

psql has zero awareness of pgbouncer or any other non-PostgreSQL server you might be able to point it to and establish a successful connection.  The lack of a warning previously is probably more incorrect than its presence now.

That said, I'd probably try and teach psql to check for whether its remote is a PostgreSQL server and, if not, warn that basically everything but direct query sending is unlikely to work.  Skipping the version processing logic altogether since you are correct it makes no sense to compare the client version to a server version of a non-PostgreSQL server.

David J.

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Non-reproducible AIO failure
Next
From: Masahiko Sawada
Date:
Subject: Re: Assert("vacrel->eager_scan_remaining_successes > 0")