pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Make dblink interruptible, via new libpqsrv APIs. 5+ messages / 1 participants [nested] [flat]
* pgsql: Make dblink interruptible, via new libpqsrv APIs. @ 2024-01-08 19:41 Noah Misch <noah@leadboat.com> 0 siblings, 0 replies; 5+ messages in thread From: Noah Misch @ 2024-01-08 19:41 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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. Use them in postgres_fdw, replacing a local implementation from which the libpqsrv implementation derives. This is a bug fix for dblink. Code inspection identified the bug at least thirteen years ago, but user complaints have not appeared. Hence, no back-patch for now. Discussion: https://postgr.es/m/20231122012945.74@rfd.leadboat.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/d3c5f37dd543498cc7c678815d3921823beec9e9 Modified Files -------------- contrib/dblink/dblink.c | 28 +++-- contrib/postgres_fdw/connection.c | 88 +++----------- contrib/postgres_fdw/deparse.c | 2 +- contrib/postgres_fdw/postgres_fdw.c | 10 +- contrib/postgres_fdw/postgres_fdw.h | 2 +- doc/src/sgml/dblink.sgml | 9 ++ .../libpqwalreceiver/libpqwalreceiver.c | 9 +- src/include/libpq/libpq-be-fe-helpers.h | 127 +++++++++++++++++++++ 8 files changed, 180 insertions(+), 95 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Make dblink interruptible, via new libpqsrv APIs. @ 2025-04-03 16:36 Noah Misch <noah@leadboat.com> 0 siblings, 0 replies; 5+ messages in thread From: Noah Misch @ 2025-04-03 16:36 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_16_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/82a8f0f465ea4bb0d2774f9856ecd62067796686 Modified Files -------------- contrib/dblink/dblink.c | 24 ++-- .../libpqwalreceiver/libpqwalreceiver.c | 9 +- src/include/libpq/libpq-be-fe-helpers.h | 127 +++++++++++++++++++++ 3 files changed, 143 insertions(+), 17 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Make dblink interruptible, via new libpqsrv APIs. @ 2025-04-03 16:36 Noah Misch <noah@leadboat.com> 0 siblings, 0 replies; 5+ messages in thread From: Noah Misch @ 2025-04-03 16:36 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/63f6ecb6b023143becd4d8a580c23c0a3259dc84 Modified Files -------------- contrib/dblink/dblink.c | 25 ++-- .../libpqwalreceiver/libpqwalreceiver.c | 9 +- src/include/libpq/libpq-be-fe-helpers.h | 127 +++++++++++++++++++++ 3 files changed, 144 insertions(+), 17 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Make dblink interruptible, via new libpqsrv APIs. @ 2025-04-03 16:36 Noah Misch <noah@leadboat.com> 0 siblings, 0 replies; 5+ messages in thread From: Noah Misch @ 2025-04-03 16:36 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/a8a9189376af5be5afab2a086fd9a9d25b23b07c Modified Files -------------- contrib/dblink/dblink.c | 25 ++-- .../libpqwalreceiver/libpqwalreceiver.c | 9 +- src/include/libpq/libpq-be-fe-helpers.h | 127 +++++++++++++++++++++ 3 files changed, 144 insertions(+), 17 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Make dblink interruptible, via new libpqsrv APIs. @ 2025-04-03 16:36 Noah Misch <noah@leadboat.com> 0 siblings, 0 replies; 5+ messages in thread From: Noah Misch @ 2025-04-03 16:36 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/186c586c3717d050e99c14b45f8e52a5d74bc7ba Modified Files -------------- contrib/dblink/dblink.c | 25 ++-- .../libpqwalreceiver/libpqwalreceiver.c | 9 +- src/include/libpq/libpq-be-fe-helpers.h | 127 +++++++++++++++++++++ 3 files changed, 144 insertions(+), 17 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2025-04-03 16:36 UTC | newest] Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2024-01-08 19:41 pgsql: Make dblink interruptible, via new libpqsrv APIs. Noah Misch <noah@leadboat.com> 2025-04-03 16:36 pgsql: Make dblink interruptible, via new libpqsrv APIs. Noah Misch <noah@leadboat.com> 2025-04-03 16:36 pgsql: Make dblink interruptible, via new libpqsrv APIs. Noah Misch <noah@leadboat.com> 2025-04-03 16:36 pgsql: Make dblink interruptible, via new libpqsrv APIs. Noah Misch <noah@leadboat.com> 2025-04-03 16:36 pgsql: Make dblink interruptible, via new libpqsrv APIs. Noah Misch <noah@leadboat.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox