Re: [HACKERS] libpq questions...when threads collide

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] libpq questions...when threads collide
Дата
Msg-id 4555.945038510@sss.pgh.pa.us
обсуждение исходный текст
Ответ на libpq questions...when threads collide  (Don Baccus <dhogaza@pacifier.com>)
Ответы Re: [HACKERS] libpq questions...when threads collide  (Don Baccus <dhogaza@pacifier.com>)
Список pgsql-hackers
Don Baccus <dhogaza@pacifier.com> writes:
> Despite the thread unsafeness
> of PQsetdb et al, I've never seen a failure in this environment
> and I've never heard of folks experiencing such a failure.

The *only* thing that's actually thread-unsafe, AFAIR, is
PQconnectdb's use of a global array for connection parameters.
PQsetdb/setdbLogin are thread-safe; so just use them instead.

At least that was true before the async-connection code got added.
I haven't looked at that to see if it introduces any problems.
        regards, tom lane


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

Предыдущее
От: Don Baccus
Дата:
Сообщение: libpq questions...when threads collide
Следующее
От: The Hermit Hacker
Дата:
Сообщение: Re: [HACKERS] 6.6 release