agora inbox for pgsql-interfaces@postgresql.org
help / color / mirror / Atom feedFrom: Tom Lane <tgl@sss.pgh.pa.us>
To: Donald Carlile <carlile@me.com>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: PQExec returns null question
Date: Mon, 20 Oct 2014 13:31:08 -0400
Message-ID: <2666.1413826268@sss.pgh.pa.us> (raw)
In-Reply-To: <D2BB3EEC-5FA7-4EB3-B232-ADBBC06590B0@me.com>
References: <D2BB3EEC-5FA7-4EB3-B232-ADBBC06590B0@me.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-interfaces>
Donald Carlile <carlile@me.com> writes:
> Our OS X application uses PostgreSQL as a back end through pqlib. Some of our customers are reporting occasional PGRES_FATAL_ERRORs, but PQresultErrorMessage 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. The docs say that this shouldnt 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 happening? 2) If it does happen, how can I remedy it?
There's a recent bug report
http://www.postgresql.org/message-id/20141019003736.2662.84048@wrigleys.postgresql.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?
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.
regards, tom lane
--
Sent via pgsql-interfaces mailing list (pgsql-interfaces@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-interfaces
view thread (3+ messages) latest in thread
Message-ID: <2666.1413826268@sss.pgh.pa.us>
Permalink: ../2666.1413826268@sss.pgh.pa.us/
Also on: postgresql.org/message-id/2666.1413826268@sss.pgh.pa.us
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: tgl@sss.pgh.pa.us, carlile@me.com
Subject: Re: PQExec returns null question
In-Reply-To: <2666.1413826268@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox