From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: andres@anarazel.de
Subject: BUG #15560: psql ought to re-check version when re-establishing connections
Date: Wed, 19 Dec 2018 05:42:32 +0000
Message-ID: <15560-314c36aa4d44057e@postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 15560
Logged by: Andres Freund
Email address: andres@anarazel.de
PostgreSQL version: 11.1
Operating system: Debian/Irrelevant
Description:
Hi,
When psql re-establishes a connection it doesn't check the version of the
server like it does during startup, or when changing the connection with
\c.
Now, it's probably not extremely common that the server version changes
without any of the query parameters changing, but I definitely hit this
during development & testing, when I bring up an older version of PG to
compare behaviour.
postgres[8571][1]=# SELECT version();
┌─────────────────────────────────────────────────────────────────────────────────────────┐
│ version
│
├─────────────────────────────────────────────────────────────────────────────────────────┤
│ PostgreSQL 11.1 on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.2.0-10)
8.2.0, 64-bit │
└─────────────────────────────────────────────────────────────────────────────────────────┘
(1 row)
postgres[8571][1]=# \echo :SERVER_VERSION_NAME
11.1
postgres[8571][1]=# SELECT 1;
FATAL: 57P01: terminating connection due to administrator command
LOCATION: ProcessInterrupts, postgres.c:2957
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
The connection to the server was lost. Attempting reset: Succeeded.
Time: 6.267 ms
postgres[8618][1]=# SELECT version();
┌──────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ version
│
├──────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ PostgreSQL 9.1.23 on x86_64-unknown-linux-gnu, compiled by gcc-6 (Debian
6.2.0-3) 6.2.0 20160901, 64-bit │
└──────────────────────────────────────────────────────────────────────────────────────────────────────────┘
(1 row)
Time: 4.189 ms
postgres[8618][1]=# \echo :SERVER_VERSION_NAME
11.1
Regards,
Andres
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: noreply@postgresql.org, andres@anarazel.de
Subject: Re: BUG #15560: psql ought to re-check version when re-establishing connections
In-Reply-To: <15560-314c36aa4d44057e@postgresql.org>
References: <15560-314c36aa4d44057e@postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox