> On 23 Jul 2026, at 08:40, Michael Paquier <[email protected]> wrote: > > done
Hi, While running CI for an unrelated patch, I saw wait_cleanup fail in the Windows Visual Studio job[0]. The server log contains the expected FATAL, but isolationtester only saw: PQconsumeInput failed: server closed the connection unexpectedly It then exited without running the rest of the permutation or teardown, so heap_lock_update failed afterwards because the injection_points extension still existed. This seems to be another instance of the known Windows behavior where the last server message can be lost when a connection is closed [1]. The test added in a49b6a61094 intentionally terminates an isolationtester connection, so it is exposed to that behavior. The attached patch makes isolationtester treat PQconsumeInput() failure with CONNECTION_BAD as completion of the step. It reports any complete server error already buffered by libpq, followed by the saved connection error, and the rest of the test and teardown can run. Other PQconsumeInput() failures remain fatal. An alternative expected file covers the case where Windows loses the server's FATAL and only the libpq-generated connection error remains. The alternative output is synthetic. I tested it by temporarily suppressing the final ErrorResponse while leaving backend termination unchanged. The output then matched wait_cleanup_1.out. With normal error delivery it matched wait_cleanup.out. If anyone knows a way to reproduce the actual Windows message loss on demand, that would be useful. Otherwise, the next occurrence in CI with this patch applied will give us an output to compare with the alternative file. The injection_points isolation tests pass through Windows CI. If I have misdiagnosed the cause of this CI failure, apologies for the noise. Best regards, Andrey Borodin. [0] https://github.com/x4m/postgres_g/actions/runs/32582921356/job/97055012805 [1] https://postgr.es/m/CA%2BhUKGLR10ZqRCvdoRrkQusq75wF5%3DvEetRSs2_u1s%2BFAUosFQ%40mail.gmail.com
v1-0001-Let-isolationtester-report-connection-loss-as-a-s.patch
Description: Binary data
