pgsql: Fix bogus loop logic in 013_crash_restart test's pump_untilsubr

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Fix bogus loop logic in 013_crash_restart test's pump_untilsubr
Дата
Msg-id E1foyUn-0001He-Bw@gemulon.postgresql.org
обсуждение исходный текст
Ответы Re: pgsql: Fix bogus loop logic in 013_crash_restart test'spump_until subr  (Thomas Munro <thomas.munro@enterprisedb.com>)
Список pgsql-committers
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
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/d11eae09e48694ad6b4139bbb7d7b112833301f5

Modified Files
--------------
src/test/recovery/README                 | 2 ++
src/test/recovery/t/013_crash_restart.pl | 5 ++---
2 files changed, 4 insertions(+), 3 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix wrong order of operations in inheritance_planner.
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Revert "Distinguish printf-like functions that support %m fromt