pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add helper library for use of libpq inside the server environmen
Date: Tue, 24 Jan 2023 03:27:10 +0000
Message-ID: <E1pK9xm-005Awk-GN@gemulon.postgresql.org> (raw)

Add helper library for use of libpq inside the server environment

Currently dblink and postgres_fdw don't process interrupts during connection
establishment. Besides preventing query cancellations etc, this can lead to
undetected deadlocks, as global barriers are not processed.

Libpqwalreceiver in contrast, processes interrupts during connection
establishment. The required code is not trivial, so duplicating it into
additional places does not seem like a good option.

These aforementioned undetected deadlocks are the reason for the spate of CI
test failures in the FreeBSD 'test_running' step.

For now the helper library is just a header, as it needs to be linked into
each extension using libpq, and it seems too small to be worth adding a
dedicated static library for.

The conversion to the helper are done in subsequent commits.

Reviewed-by: Thomas Munro <thomas.munro@gmail.com>
Discussion: https://postgr.es/m/20220925232237.p6uskba2dw6fnwj2@awork3.anarazel.de

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/28a591711d505f1f64c4f2eff5873ca2de0abede

Modified Files
--------------
src/include/libpq/libpq-be-fe-helpers.h | 242 ++++++++++++++++++++++++++++++++
1 file changed, 242 insertions(+)



view thread (4+ messages)  latest in thread

Message-ID: <E1pK9xm-005Awk-GN@gemulon.postgresql.org>
Permalink:  ../E1pK9xm-005Awk-GN@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1pK9xm-005Awk-GN@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: andres@anarazel.de, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Add helper library for use of libpq inside the server environmen
  In-Reply-To: <E1pK9xm-005Awk-GN@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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