pgsql: Accept that server might not be able to send error in crash reco

Started by Andres Freundalmost 9 years ago3 messagescomitters
Jump to latest
#1Andres Freund
andres@anarazel.de

Accept that server might not be able to send error in crash recovery test.

As it turns out we can't rely that the script's monitoring session is
terminated with a proper error by the server, because the session
might be terminated while already trying to send data.

Also improve robustness and error reporting facilities of the test,
developed while debugging this issue.

Discussion: /messages/by-id/20170920020038.kllxgilo7xzwmtto@alap3.anarazel.de

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/5ada1fcd0c30be1b0b793a802cf6da386a6c1925

Modified Files
--------------
src/test/recovery/t/013_crash_restart.pl | 98 ++++++++++++++++++++++++--------
1 file changed, 74 insertions(+), 24 deletions(-)

--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Andres Freund (#1)
Re: pgsql: Accept that server might not be able to send error in crash reco

Andres Freund <andres@anarazel.de> writes:

Accept that server might not be able to send error in crash recovery test.

piculet says you didn't cover all the bases:

https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=piculet&amp;dt=2017-09-22%2017%3A10%3A01

Looks like you missed adding the "server closed the connection
unexpectedly" alternative to one of the three places.

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

#3Andres Freund
andres@anarazel.de
In reply to: Tom Lane (#2)
Re: pgsql: Accept that server might not be able to send error in crash reco

On 2017-09-22 13:30:14 -0400, Tom Lane wrote:

Andres Freund <andres@anarazel.de> writes:

Accept that server might not be able to send error in crash recovery test.

piculet says you didn't cover all the bases:

https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=piculet&amp;dt=2017-09-22%2017%3A10%3A01

Looks like you missed adding the "server closed the connection
unexpectedly" alternative to one of the three places.

I'd hoped^Wassumed it couldn't happen in that case. I'll expand the
expected output. FWIW, I kinda like the new debugging output for this -
makes it much easier to diagnose.

Besides this individual test, I think we really need to do something
that increases the likelihood of getting these error messages to
clients.

Greetings,

Andres Freund

--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers