From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix bogus loop logic in 013_crash_restart test's pump_until subr
Date: Sun, 12 Aug 2018 22:05:57 +0000
Message-ID: <E1foyUn-0001Hf-Bu@gemulon.postgresql.org> (raw)
Fix bogus loop logic in 013_crash_restart test's pump_until subroutine.
The pump_nb() step might've already received the desired data, so we must
check for that at the top of the loop not the bottom. Otherwise, the
call to pump() will sit with nothing to do until the timeout elapses.
pump_until then falls out with apparent success ... but the timeout has
been used up, causing the next call of pump_until to report a timeout
failure. I believe this explains the intermittent timeout failures
we've seen in the buildfarm ever since this test went in. I was able
to reproduce the problem on gaur semi-repeatably, and this appears to
fix it.
In passing, remove a duplicate assignment, fix one stdin-assignment to
look like the rest, and document the test's dependency on test_decoding.
Branch
------
REL_11_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/badaa0c50de0e1c8b1deb27d0a1ee00498e40002
Modified Files
--------------
src/test/recovery/README | 2 ++
src/test/recovery/t/013_crash_restart.pl | 5 ++---
2 files changed, 4 insertions(+), 3 deletions(-)
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
Subject: Re: pgsql: Fix bogus loop logic in 013_crash_restart test's pump_until subr
In-Reply-To: <E1foyUn-0001Hf-Bu@gemulon.postgresql.org>
References: <E1foyUn-0001Hf-Bu@gemulon.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