model-writtenrun 2490 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Noah Misch proposed interruptible libpqsrv query wrappers after observing that dblink could ignore cancellation and obstruct DROP DATABASE; his patch reused the wrappers in postgres_fdw, retained existing naming and omitted timeout parameters, while leaving walreceiver's specialized interrupt handling intact #1.
- Noah made the helper header easier for extensions to reuse on older PostgreSQL versions by removing an unnecessary wait-event include in a separate preparatory commit with no matching attachment 0efc831847.
- The original patch landed on January 8, 2024 with only an additional include in dblink; it enabled local interruption without automatically canceling remote queries, and initially omitted backports because user complaints had not appeared #1 d3c5f37dd5.
- Fujii Masao subsequently reported that terminating a postgres_fdw remote session now added an unwanted 'invalid socket' error, tracing it to PQgetResult() following a failed PQconsumeInput() #2.
- Noah argued that preserving libpq result-draining behavior mattered, while Fujii questioned the documented requirements on failure; Noah proposed adjusting libpq connection and asynchronous states to avoid the redundant wait, but no fix for that diagnostic appears in this thread #3 #4 #5.
- In March 2025, Andreas Karlsson reported a customer encountering database-operation hangs after upgrading from PostgreSQL 14 to 16 and supplied a PostgreSQL 16 adaptation of Noah's committed patch, resolving custom wait-event differences #6.
- Noah agreed to backport the dblink fix to PostgreSQL 13–16 while excluding the postgres_fdw conversion because it was already interruptible and the conversion changed diagnostics; Andreas accepted that scope #7 #8.
- Noah confirmed the backports were pushed, including the prerequisite helper header for older branches, but left connection-establishment interruptibility out because those delays were often bounded; Andreas accepted that outcome, completing the requested backport work #9 #10.