From: Jiri Sadek <jiri.sadek@gmail.com>
To: pgsql-bugs@postgresql.org
Subject: psql command line client behaviour
Date: Thu, 05 May 2011 11:34:42 +0200
Message-ID: <4DC26F32.70409@gmail.com> (raw)
I was told about behaviour of psql command line client that seems as bug
to me. When I am connected to server (cmdline client, interactive mode)
and server is restarted next query fails and client try to reconnect to
server. Problem arise when I send more queries (not speaking that this
may not be a good habit) at once - on first one client detects that
connection is lost and try to reconnect and then rest of queries are
executed (but not the first one). This can have bad consequences (e.g.
if first query is BEGIN;):
sample (postgresql 8.3.15):
(test@[local:/var/opt/testdb/pg_sockets]:20000) 10:55:34 [testdb]
#> select 10; select 20;
?column?
----------
10
(1 row)
Time: 0.142 ms
?column?
----------
20
(1 row)
Time: 0.039 ms
(test@[local:/var/opt/testdb/pg_sockets]:20000) 10:55:42 [testdb]
#> select 10; select 20;
FATAL: terminating connection due to administrator command
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.
?column?
----------
20
(1 row)
Time: 0.193 ms
I would suggest to not execute any query or all of them after reconnect.
Jiri
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: jiri.sadek@gmail.com
Subject: Re: psql command line client behaviour
In-Reply-To: <4DC26F32.70409@gmail.com>
References: <4DC26F32.70409@gmail.com>
* 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