Re: libpq OpenSSL and multithreading

2025-07-03 Thread Daniel Gustafsson
> On 2 Jul 2025, at 13:44, Peter Eisentraut wrote: > > On 27.06.25 19:24, Daniel Gustafsson wrote: >> The OpenSSL code in libpq have two issues for multithreading: the verify_cb >> callback use a global variable to pass back error detail state and there is >> one >> use of strerror(). > > Sligh

Re: libpq OpenSSL and multithreading

2025-07-02 Thread Michael Paquier
On Wed, Jul 02, 2025 at 01:44:55PM +0200, Peter Eisentraut wrote: > Couldn't this also be done by making that global variable thread-local? But > getting rid of it is even nicer. Getting rid of it like Daniel is proposing is by putting this information in the backend Port is much more elegant IMO.

Re: libpq OpenSSL and multithreading

2025-07-02 Thread Peter Eisentraut
On 27.06.25 19:24, Daniel Gustafsson wrote: The OpenSSL code in libpq have two issues for multithreading: the verify_cb callback use a global variable to pass back error detail state and there is one use of strerror(). Slightly misleading title: This is actually about the *backend* libpq code.