Re: libpq OpenSSL and multithreading

Поиск
Список
Период
Сортировка
От Daniel Gustafsson
Тема Re: libpq OpenSSL and multithreading
Дата
Msg-id 12577264-4DBD-45E7-8243-81AD4CC2CDDC@yesql.se
обсуждение исходный текст
Ответ на Re: libpq OpenSSL and multithreading  (Peter Eisentraut <peter@eisentraut.org>)
Ответы Re: libpq OpenSSL and multithreading
Список pgsql-hackers
> On 1 Sep 2025, at 07:27, Peter Eisentraut <peter@eisentraut.org> wrote:

> I suggest that instead of adding the context to the Port structure, make a separate context struct for this purpose,
forexample: 

Fair enough, done in the attached.

> This seems like an extremely inconvenient solution, as can be seen by the amount of changes your patch introduces.
Wecould just make errbuf thread-local and be done, without having to change the API.  (This is how glibc's strerror()
worksinternally.) 

I assume you mean simply leaving it be for now awaiting more thread primitives
to be added to fully support thread local storage?  (sidenote; if our thread
local store code will use TLS then be-secure-openssl.c will be challenging to
read =)).

I've left out this portion in the attached and only left the callback private
data change.

--
Daniel Gustafsson


Вложения

В списке pgsql-hackers по дате отправления: