On Thu, Nov 26, 2026 at 03:10:59PM +0100, Jelte Fennema-Nio wrote: > The graceful close is important (it's what fixes Greg's failures), but > it isn't enough to fix the problem I ran into. If the client sends > anything after the backend is gone, the server's OS (Windows or Linux) > answers with an RST and Winsock discards the unread FATAL. That's the > normal case for a FATAL on an idle connection (bug #15598 [2]), and > Alexander Lakhin hit it in 2023 too [3]. So attached is a > fix/workaround for that as well: libpq reads any pending network data > into its own buffer before sending a new query.
That's a new thing. > Attached v2, which also addresses Jacob's and Michael's concerns: > 0001: Zsolt's graceful shutdown reapply, unchanged > 0002: Zsolt's isolation test skip revert, rebased > 0003: fixup of 0001's comment, addressing Jacob's review > 0004: libpq on Windows reads pending input before sending a query on an > idle connection, plus tests > 0005: POC for a server-side lingering close, which would make these > lost FATAL errors even more unlikely Err, 0005, that controls with a GUC for how long a backend should stay around to flush its information, feels like an unstable knob to me. Let's assume that we do 0004, why would there be any need for 0005, then? Perhaps it would be better for Jacob to comment here. I was under the impression that there was little need for more than 0003 in terms of the tests, at least. -- Michael
signature.asc
Description: PGP signature
