aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeLimit.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2018-08-12 18:05:49 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2018-08-12 18:05:49 -0400
commitd11eae09e48694ad6b4139bbb7d7b112833301f5 (patch)
tree3bf6c74424d1f6172df2f3c9248cb94adf990700 /src/backend/executor/nodeLimit.c
parent4a2994f055be9405a254b22de6cd2107a0f46563 (diff)
downloadpostgresql-d11eae09e48694ad6b4139bbb7d7b112833301f5.tar.gz
postgresql-d11eae09e48694ad6b4139bbb7d7b112833301f5.zip
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.
Diffstat (limited to 'src/backend/executor/nodeLimit.c')
0 files changed, 0 insertions, 0 deletions