Re: [PATCH] Add PQgetThreadLock() to expose the Kerberos/Curl mutex

From: Nico Williams <nico(at)cryptonector(dot)com>
To: Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Add PQgetThreadLock() to expose the Kerberos/Curl mutex
Date: 2026-02-28 04:40:53
Message-ID: aaJx1XQDWeXKHCaa@ubby
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Feb 27, 2026 at 12:38:34PM -0800, Jacob Champion wrote:
> libpq has some third-party dependencies (currently, Kerberos and Curl)
> that aren't threadsafe in some situations. We protect the affected
> code with a locking callback, and we allow applications to override
> that callback globally because they might also be using those
> third-party dependencies. The history of the API is at [1, 2].

Well, that's ancient stuff. krb4? 4?!

Anyways, I'm quite curious about any thread safety problems you are
aware of in Kerberos implementations today. As for curl, it wants to be
initialized much like OpenSSL used to want to be initialized (thankfully
no more), and that's a problem.

Nico
--

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2026-02-28 05:03:28 Re: Fix slotsync worker busy loop causing repeated log messages
Previous Message Tatsuya Kawata 2026-02-28 04:37:53 Re: [Patch]Add tab completion for DELETE ... USING