Re: Why is src/test/modules/committs/t/002_standby.pl flaky?
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alexander Lakhin <exclusion@gmail.com>
Cc: Thomas Munro <thomas.munro@gmail.com>,
Andrew Dunstan <andrew@dunslane.net>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2022-01-09T16:49:30Z
Lists: pgsql-hackers
Alexander Lakhin <exclusion@gmail.com> writes: > 09.01.2022 04:17, Tom Lane wrote: >> ... wait a minute. After some more study of the buildfarm logs, >> it was brought home to me that these failures started happening >> just after 6051857fc went in: > I've managed to reproduce this failure too. > Removing "shutdown(MyProcPort->sock, SD_SEND);" doesn't help here, so > the culprit is exactly "closesocket(MyProcPort->sock);". Ugh. Did you try removing the closesocket and keeping shutdown? I don't recall if we tried that combination before. > ... I'm not sure where to > place this check, maybe it's better to move it up to > libpqrcv_PQgetResult() to minimize it's footprint or to find less > Windows-specific approach, but I'd prefer a client-side fix anyway, as > graceful closing a socket by a server seems a legitimate action. What concerns me here is whether this implies that other clients (libpq, jdbc, etc) are going to need changes as well. Maybe libpq is okay, because we've not seen failures of the isolation tests that use pg_cancel_backend(), but still it's worrisome. I'm not entirely sure whether the isolationtester would notice that a connection that should have died didn't. regards, tom lane
Commits
-
Revert "graceful shutdown" changes for Windows.
- 29992a6a509b 15.0 landed
-
Revert "graceful shutdown" changes for Windows, in back branches only.
- bbb1caf6b220 11.15 landed
- 75674c7ec1b1 14.2 landed
- 64b2c6507e57 12.10 landed
- 645c9457f296 10.20 landed
- 213c5aa3bdba 13.6 landed