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

From Shaik Mohammad Mujeeb
Subject Re: Clarification on warning when connecting to 'pgbouncer' database via Pgbouncer
Date
Msg-id 1971a7c57b4.1297b81cb39817.6046746814569696904@zohocorp.com
Whole thread Raw
In response to Re: Clarification on warning when connecting to 'pgbouncer' database via Pgbouncer  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> The entire point of having a wire protocol is that you can't/don't
> need to detect that.  The short answer here is that this is
> pgbouncer's bug and you should be nagging them to change, not us.

Assuming we've requested the PgBouncer team to stop abusing the server_version parameter for the special 'pgbouncer' database, and they’ve agreed to pass the actual PostgreSQL server version instead - this would prevent us from showing the usual warning, since the version would now appear to be > 9.2

But, still most of the psql features won't work here, right? Won't it be a false positive to not show the warning here? Please correct me if I'm wrong.


Thanks & Regards,
Shaik Mohammad Mujeeb
Member Technical Staff
Zoho Corp



---- On Wed, 28 May 2025 04:51:05 +0530 Tom Lane <tgl@sss.pgh.pa.us> wrote ---

Shaik Mohammad Mujeeb <mujeeb.sk@zohocorp.com> writes:
> So, I feel that if we can reliably detect when the backend is a non-PostgreSQL server, it might be better to adjust the warning accordingly, rather than relying on a client-server version comparison in such cases.

The entire point of having a wire protocol is that you can't/don't
need to detect that. The short answer here is that this is
pgbouncer's bug and you should be nagging them to change, not us.

            regards, tom lane


pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: backend_xmin is null in pg_stat_replication, although repl. slot change it
Next
From: Ajin Cherian
Date:
Subject: Re: Logical Replication of sequences