Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XgIgv-0007Ww-Eo for pgsql-interfaces@arkaria.postgresql.org; Mon, 20 Oct 2014 19:32:29 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XgIgu-0001ZT-Ut for pgsql-interfaces@arkaria.postgresql.org; Mon, 20 Oct 2014 19:32:28 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XgIgu-0001ZN-9h for pgsql-interfaces@postgresql.org; Mon, 20 Oct 2014 19:32:28 +0000 Received: from st11p02mm-asmtpout001.mac.com ([17.172.220.236] helo=st11p02mm-asmtp001.mac.com) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XgIgq-0005y2-A4 for pgsql-interfaces@postgresql.org; Mon, 20 Oct 2014 19:32:26 +0000 Received: from dons-mbp.home (pool-96-229-129-152.lsanca.fios.verizon.net [96.229.129.152]) by st11p02mm-asmtp001.mac.com (Oracle Communications Messaging Server 7u4-27.10(7.0.4.27.9) 64bit (built Jun 6 2014)) with ESMTPSA id <0NDR00HU6CRYAE80@st11p02mm-asmtp001.mac.com> for pgsql-interfaces@postgresql.org; Mon, 20 Oct 2014 19:28:48 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.12.52,1.0.28,0.0.0000 definitions=2014-10-20_04:2014-10-20,2014-10-20,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=2 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1408290000 definitions=main-1410200186 Content-type: text/plain; charset=windows-1252 MIME-version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: PQExec returns null question From: Donald Carlile In-reply-to: <2666.1413826268@sss.pgh.pa.us> Date: Mon, 20 Oct 2014 12:28:46 -0700 Cc: pgsql-interfaces@postgresql.org Content-transfer-encoding: quoted-printable Message-id: <1C7ADC29-7929-4D53-AB0B-A6CC5A8263CB@me.com> References: <2666.1413826268@sss.pgh.pa.us> To: Tom Lane X-Mailer: Apple Mail (2.1878.6) X-Pg-Spam-Score: -4.5 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-interfaces Precedence: bulk Sender: pgsql-interfaces-owner@postgresql.org Tom, Thanks for the reply. I had thought we were testing for loss of connection = before we send a query, but it doesn=92t appear that we are. I=92ll go back= and look at the postmaster log to see if I can find more information. I=92= ll also check to see if there=92s a way to really test connection before we= send a query. Regards, Don On Oct 20, 2014, at 10:31 AM, Tom Lane wrote: > Donald Carlile writes: >> Our OS X application uses PostgreSQL as a back end through pqlib. Some o= f our customers are reporting occasional PGRES_FATAL_ERRORs, but PQresultEr= rorMessage returns a blank string. I have looked at the sources, and as far= as I can tell, this condition can only occur when PQExec returns a null. T= he docs say that this shouldn=92t happen except in out of memory conditions= . I am not using any Copy actions. >> I have two broad questions. 1) What can I do to prevent this from happen= ing? 2) If it does happen, how can I remedy it? >=20 > There's a recent bug report > http://www.postgresql.org/message-id/20141019003736.2662.84048@wrigleys.p= ostgresql.org > suggesting that this might happen after a loss of connection. It'd be a > libpq bug that it's not providing a more useful error message in such a > case, but probably the more interesting question from your standpoint > is why is the server dropping the connection. Have you looked into the > postmaster log to see if anything gets logged when this happens? >=20 > If it's not a connection-loss case then you've found some new bug that > we ought to look into, but without a reproducible test case it's hard > to do much in that line. >=20 > regards, tom lane --=20 Sent via pgsql-interfaces mailing list (pgsql-interfaces@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-interfaces