Using one connection object. - Mailing list pgsql-interfaces

From sankar
Subject Using one connection object.
Date
Msg-id Sea2-DAV38xSQWBLYu700000dc7@hotmail.com
Whole thread Raw
List pgsql-interfaces
Hi,
I am using postgresql 7.2 on red hat linux.I am having only one connection to the database thro
PGconn(struct pg_conn ) which serves all the clients. I understand that PGconn is not thread safe.
So from my program I am having mutexes to protect PGconn from multiple access by 2 or more threads.
 
Using this model execution goes thro for around 20/30 queries. After that somehow ExecTuplesOK() call from one thread is blocking for some reason because of which other threads are not able to proceed. (Pls note I have protected call to ExecTuplesOK()  using mutex so that only one  thread can enter it.)
 
If anybody has any idea pls let me know..
 
Thanks in advance
Sankarshana M

pgsql-interfaces by date:

Previous
From: "Jeroen T. Vermeulen"
Date:
Subject: Re: GetValue(), floats, and locales
Next
From: Ramon Alonso Allende
Date:
Subject: Re: lo_import