Using one connection object.

From: "sankar" <san_madhav(at)hotmail(dot)com>
To: <pgsql-interfaces(at)postgresql(dot)org>
Subject: Using one connection object.
Date: 2003-05-07 21:46:10
Message-ID: Sea2-DAV38xSQWBLYu700000dc7@hotmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-interfaces by date

  From Date Subject
Next Message Ramon Alonso Allende 2003-05-08 07:15:50 Re: lo_import
Previous Message Jeroen T. Vermeulen 2003-05-07 19:03:44 Re: GetValue(), floats, and locales