RE: [HACKERS] Threads

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема RE: [HACKERS] Threads
Дата
Msg-id 215896B6B5E1CF11BC5600805FFEA82101F70BF4@sirius.edu.sollentuna.se
обсуждение исходный текст
Ответы Re: [HACKERS] Threads  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
:
> > Hmm, what about threads in the frontend? Anyone know if 
> libpq is thread
> > safe, and if not, how hard it might be to make it so?
> 
> It is not; the main reason why not is a brain-dead part of 
> the API that
> exposes modifiable global variables.  Check the mail list archives
> (probably psql-interfaces, but maybe -hackers) for previous 
> discussions
> with details.  Earlier this year I think, or maybe late 98.

Hmm. Really?
AFAIK, only:
pgresStatus[]

is exported, and that one is a) read-only and b) deprecated, and replaced
with a function.

No?

Otherwise, I've been darn lucky in the multithreaded stuff I have :-) (I run
with a different PGconn for each thread, and the PGresult:s are protected by
CriticalSections (this is Win32)). And if that's it, then I really need to
fix it...


//Magnus


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

Предыдущее
От: Duane Currie
Дата:
Сообщение: Re: [HACKERS] Threads
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] pg_upgrade may be mortally wounded