Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id AD6146507A3 for ; Tue, 22 Jul 2008 17:09:09 -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 17489-02 for ; Tue, 22 Jul 2008 17:08:55 -0300 (ADT) Received: from mx3.hub.org (mx3.hub.org [206.223.169.73]) by postgresql.org (Postfix) with ESMTP id 596E86502DB for ; Tue, 22 Jul 2008 16:25:48 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mx3.hub.org (Postfix) with ESMTP id E6E0937C8E7 for ; Tue, 22 Jul 2008 14:30:27 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id m6MHSkhJ000715; Tue, 22 Jul 2008 13:28:46 -0400 (EDT) To: "Sunil Khatri" cc: pgsql-interfaces@postgresql.org Subject: Re: PQstatus is getting blocked when database sytem powered off In-reply-to: <001901c8ec12$66ad2990$be00a8c0@6dBangalore.co.in> References: <001901c8ec12$66ad2990$be00a8c0@6dBangalore.co.in> Comments: In-reply-to "Sunil Khatri" message dated "Tue, 22 Jul 2008 21:18:32 +0530" Date: Tue, 22 Jul 2008 13:28:46 -0400 Message-ID: <714.1216747726@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200807/15 X-Sequence-Number: 6773 "Sunil Khatri" writes: > Problem is : PQstatus is getting blocked If the system on which database server is running is powered off. Hardly likely, considering that PQstatus is just ConnStatusType PQstatus(const PGconn *conn) { if (!conn) return CONNECTION_BAD; return conn->status; } I have no doubt that a query-issuing call could get blocked if the postmaster stops responding, but not PQstatus. regards, tom lane