Make dblink interruptible, via new libpqsrv APIs.

Noah Misch <noah@leadboat.com>

Commit: a8a9189376af5be5afab2a086fd9a9d25b23b07c
Author: Noah Misch <noah@leadboat.com>
Date: 2025-04-03T16:34:01Z
Releases: 14.18
Make dblink interruptible, via new libpqsrv APIs.

This replaces dblink's blocking libpq calls, allowing cancellation and
allowing DROP DATABASE (of a database not involved in the query).  Apart
from explicit dblink_cancel_query() calls, dblink still doesn't cancel
the remote side.  The replacement for the blocking calls consists of
new, general-purpose query execution wrappers in the libpqsrv facility.
Out-of-tree extensions should adopt these.

The original commit d3c5f37dd543498cc7c678815d3921823beec9e9 did not
back-patch.  Back-patch now to v16-v13, bringing coverage to all supported
versions.  This back-patch omits the orignal's refactoring in postgres_fdw.

Discussion: https://postgr.es/m/20231122012945.74@rfd.leadboat.com

Files

Discussion