Re: [GENERAL] PQstatus does not seem to work

2009-08-10 Thread Juan Backson
Hi Tim, Thank you for your suggestion. In my application, it is a multi-thread and each thread will need to query 5 select statements. Right now, I am having my own pool of 500 PgConn inside the code. For each connection that I obtain from the connection pool, I am using direct socket into que

Re: [GENERAL] PQstatus does not seem to work

2009-08-10 Thread Tim Hart
On 8/10/09 12:08 PM, "Sam Mason" wrote: > On Tue, Aug 11, 2009 at 12:41:47AM +0800, Juan Backson wrote: >> I used PQstatus(conn) function to check connection status, but I found that >> it still returns CONNECTION_OK even after postgres is restarted. Does >> anyone know if there is another comm

Re: [GENERAL] PQstatus does not seem to work

2009-08-10 Thread Sam Mason
On Tue, Aug 11, 2009 at 12:41:47AM +0800, Juan Backson wrote: > I used PQstatus(conn) function to check connection status, but I found that > it still returns CONNECTION_OK even after postgres is restarted. Does > anyone know if there is another command that I can use to check connection > status?

Re: [GENERAL] PQstatus does not seem to work

2009-08-10 Thread Tom Lane
Juan Backson writes: > I used PQstatus(conn) function to check connection status, but I found that > it still returns CONNECTION_OK even after postgres is restarted. Does > anyone know if there is another command that I can use to check connection > status? PQstatus isn't going to get updated u

[GENERAL] PQstatus does not seem to work

2009-08-10 Thread Juan Backson
Hi I used PQstatus(conn) function to check connection status, but I found that it still returns CONNECTION_OK even after postgres is restarted. Does anyone know if there is another command that I can use to check connection status? What other solution is available to check whether a connection