Re: recovery test failures on hoverfly
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael@paquier.xyz>
Cc: Amit Kapila <amit.kapila16@gmail.com>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>,
Noah Misch <noah@leadboat.com>
Date: 2021-06-11T22:28:41Z
Lists: pgsql-hackers
Attachments
- use-undef-in-poll_query_until-for-restart.patch (text/x-diff) patch
I wrote: > Michael Paquier <michael@paquier.xyz> writes: >> This is the same problem as c757a3da and 6d41dd0, where we write a >> query to a pipe but the kill, causing a failure, makes the test fail >> with a SIGPIPE in IPC::Run as a query is sent down to a pipe. > The precedent of the previous fixes would seem to suggest seeing if > we can replace 'SELECT 1' with "undef". Not sure if that'll work > without annoying changes to poll_query_until, though. I noticed that elver failed this same way today, so that got me annoyed enough to pursue a fix. Using "undef" as poll_query_until's input almost works, except it turns out that it fails to notice psql connection failures in that case! It is *only* looking at psql's stdout, not at either stderr or the exit status, which seems seriously bogus in its own right; not least because poll_query_until's own documentation claims it will continue waiting after an error, which is exactly what it's not doing. So I propose the attached. (I first tried to make it check $result == 0, but it seems there are a lot of cases where psql returns status 1 in these tests. That seems pretty bogus too, but probably beta is no time to change that behavior.) regards, tom lane
Commits
-
Restore robustness of TAP tests that wait for postmaster restart.
- f452aaf7d4a9 14.0 landed
- b170ca021c6a 11.13 landed
- 94e21021cdf2 13.4 landed
- 1b48dd50abd6 10.18 landed
- 0b619df6daca 12.8 landed