]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Make dblink interruptible, via new libpqsrv APIs.
authorNoah Misch <noah@leadboat.com>
Mon, 8 Jan 2024 19:39:56 +0000 (11:39 -0800)
committerNoah Misch <noah@leadboat.com>
Thu, 3 Apr 2025 16:33:58 +0000 (09:33 -0700)
commit82a8f0f465ea4bb0d2774f9856ecd62067796686
treece4e07b82ccd020e24e37a51a9fd1021cb6743a0
parent5fb9f967c373457fd0babde6c7467edcc245906a
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
contrib/dblink/dblink.c
src/backend/replication/libpqwalreceiver/libpqwalreceiver.c
src/include/libpq/libpq-be-fe-helpers.h