pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Remove libpq's use of abort(3) to handle mutex failure cases.
Date: Tue, 29 Jun 2021 15:31:24 +0000
Message-ID: <E1lyFhs-0008To-Np@gemulon.postgresql.org> (raw)

Remove libpq's use of abort(3) to handle mutex failure cases.

Doing an abort() seems all right in development builds, but not in
production builds of general-purpose libraries.  However, the functions
that were doing this lack any way to report a failure back up to their
callers.  It seems like we can just get away with ignoring failures in
production builds, since (a) no such failures have been reported in the
dozen years that the code's been like this, and (b) failure to enforce
mutual exclusion during fe-auth.c operations would likely not cause any
problems anyway in most cases.  (The OpenSSL callbacks that use this
macro are obsolete, so even less likely to cause interesting problems.)

Possibly a better answer would be to break compatibility of the
pgthreadlock_t callback API, but in the absence of field problem
reports, it doesn't really seem worth the trouble.

Discussion: https://postgr.es/m/3131385.1624746109@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/aaddf6ba09e25878e792f0d15f725370e19396df

Modified Files
--------------
src/interfaces/libpq/fe-connect.c        | 11 ++++++++---
src/interfaces/libpq/fe-secure-openssl.c |  9 +++++++--
src/interfaces/libpq/libpq-int.h         |  7 -------
3 files changed, 15 insertions(+), 12 deletions(-)



Message-ID: <E1lyFhs-0008To-Np@gemulon.postgresql.org>
Permalink:  ../E1lyFhs-0008To-Np@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1lyFhs-0008To-Np@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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Remove libpq's use of abort(3) to handle mutex failure cases.
  In-Reply-To: <E1lyFhs-0008To-Np@gemulon.postgresql.org>
  References: <E1lyFhs-0008To-Np@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