Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 8006F650209 for ; Tue, 22 Jul 2008 12:51:13 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 13726-07-3 for ; Tue, 22 Jul 2008 12:51:02 -0300 (ADT) X-Greylist: delayed 00:06:33.173747 by SQLgrey-1.7.6 Received: from smtp100.biz.mail.re2.yahoo.com (smtp100.biz.mail.re2.yahoo.com [206.190.52.46]) by postgresql.org (Postfix) with SMTP id 1DD446503A5 for ; Tue, 22 Jul 2008 12:46:54 -0300 (ADT) Received: (qmail 4789 invoked from network); 22 Jul 2008 15:40:07 -0000 Received: from unknown (HELO STSBANWRK134) (sunil@6dtech.co.in@61.95.192.235 with login) by smtp100.biz.mail.re2.yahoo.com with SMTP; 22 Jul 2008 15:40:06 -0000 X-YMail-OSG: xIp4CBQVM1m02BwEr9UjxVMbhg57upwIV2n5O4CXijz0H4v8YRacvvziKM2k53b1Te3sLSN0EiIDpYU257S5GTDWJjMB5mp2.DeHeICWtg-- X-Yahoo-Newman-Property: ymail-3 Message-ID: <009001c8ec11$60fbe820$be00a8c0@6dBangalore.co.in> From: "Sunil Khatri" To: Subject: PQstatus is not returning Date: Tue, 22 Jul 2008 21:11:13 +0530 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_008D_01C8EC3F.78ECAA90" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.3138 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200807/13 X-Sequence-Number: 6771 This is a multi-part message in MIME format. ------=_NextPart_000_008D_01C8EC3F.78ECAA90 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, In my application I need to check connection status before executing the = query. I am doing it using PQstatus.=20 Problem is : PQstatus is getting blocked If the system on which database = server is running is powered off. If I shutdown the database using pg_ctl stop or pkill -9 postmaster in = that case its returning. Is there any other way to check the connection status in this case? Thanks=20 Sk ------=_NextPart_000_008D_01C8EC3F.78ECAA90 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi,
In my application I need to check = connection status=20 before executing the query. I am doing it using PQstatus.
Problem is : PQstatus is getting = blocked If the=20 system on which database server is running is powered off.
If I shutdown the database using pg_ctl = stop or=20 pkill -9 postmaster in that case its returning.
 
Is there any other way to check the = connection=20 status in this case?
 
Thanks
Sk
------=_NextPart_000_008D_01C8EC3F.78ECAA90--