Обсуждение: Is PGconn* thread safe?

Поиск
Список
Период
Сортировка

Is PGconn* thread safe?

От
Wei Weng
Дата:
Can I use two threads to use one PGconn* or do I have to assign them 
each one with a unique PGconn*?

I searched in the mailing list archive, but couldn't find anything 
recent that has mentioned the thread safeness of libpq/PGconn*.

Thanks a lot!

Wei



Re: Is PGconn* thread safe?

От
Bruce Momjian
Дата:
They are not thread-safe but each connection can have its own PGconn.

---------------------------------------------------------------------------

Wei Weng wrote:
> Can I use two threads to use one PGconn* or do I have to assign them 
> each one with a unique PGconn*?
> 
> I searched in the mailing list archive, but couldn't find anything 
> recent that has mentioned the thread safeness of libpq/PGconn*.
> 
> Thanks a lot!
> 
> Wei
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
> 

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073