From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: pgsql-committers@postgresql.org
Subject: Re: pgsql: Make new crash restart test a bit more robust.
Date: Tue, 19 Sep 2017 16:46:58 -0400
Message-ID: <1136.1505854018@sss.pgh.pa.us> (raw)
In-Reply-To: <20170919202518.au4ngniiwdsyewbp@alap3.anarazel.de>
References: <E1duMVQ-0006xF-Q7@gemulon.postgresql.org>
<20170919192032.ctybexs5whww2rw6@alap3.anarazel.de>
<28340.1505849089@sss.pgh.pa.us>
<20170919202518.au4ngniiwdsyewbp@alap3.anarazel.de>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
Andres Freund <andres@anarazel.de> writes:
> So this is geniuinely interesting. When the machine is really loaded (as
> in 6 animals running on a vm at the same time, incuding valgrind), psql
> sometimes doesn't get the WARNING message from a shutdown. Instead it
> gets
> # psql:<stdin>:3: server closed the connection unexpectedly
> # This probably means the server terminated abnormally
> # before or while processing the request.
> # psql:<stdin>:3: connection to server was lost
That seems pretty weird. Maybe it's not the same case, but in
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=calliphoridae&dt=2017-09-19%2020%3A10%3A...
you can see from the postmaster log that the backend *is* issuing
the message, or at least it's getting to the server log:
2017-09-19 20:20:34.476 UTC [6363] [unknown] LOG: connection received: host=[local]
2017-09-19 20:20:34.477 UTC [6363] [unknown] LOG: connection authorized: user=andres database=postgres
2017-09-19 20:20:34.478 UTC [6363] t/013_crash_restart.pl LOG: statement: SELECT $$psql-connected$$;
...
2017-09-19 20:20:34.485 UTC [6363] t/013_crash_restart.pl WARNING: terminating connection because of crash of another server process
2017-09-19 20:20:34.485 UTC [6363] t/013_crash_restart.pl DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
2017-09-19 20:20:34.485 UTC [6363] t/013_crash_restart.pl HINT: In a moment you should be able to reconnect to the database and repeat your command.
Have we forgotten an fflush() or something?
Also, maybe problem is on client side. I vaguely recall a libpq bug
wherein it would complain about socket EOF even though data remained
to be processed. Maybe we reintroduced something like that?
> We can obviously easily make the test accept both - but are we ok with
> the client sometimes not getting the message?
I'm not ...
regards, tom lane
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
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-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us, andres@anarazel.de
Subject: Re: pgsql: Make new crash restart test a bit more robust.
In-Reply-To: <1136.1505854018@sss.pgh.pa.us>
References: <E1duMVQ-0006xF-Q7@gemulon.postgresql.org> <20170919192032.ctybexs5whww2rw6@alap3.anarazel.de> <28340.1505849089@sss.pgh.pa.us> <20170919202518.au4ngniiwdsyewbp@alap3.anarazel.de> <1136.1505854018@sss.pgh.pa.us>
* 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