PQExec returns null question

From: Donald Carlile <carlile(at)me(dot)com>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: PQExec returns null question
Date: 2014-10-20 16:53:20
Message-ID: D2BB3EEC-5FA7-4EB3-B232-ADBBC06590B0@me.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

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 shouldn’t 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?

I have increased the shared memory, and that seems to have helped somewhat, but it still occurs. In our experience, once this starts happening, it continues for every subsequent query. WE have found that restarting the machine will remedy it for a time, but is there a less drastic action we can take that will also remedy it? Perhaps stopping and starting PostgreSQL? Or are system resources being consumed to the level that a system restart is required?

Many Thanks,
Don Carlile

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Tom Lane 2014-10-20 17:31:08 Re: PQExec returns null question
Previous Message Stephen Davies 2014-10-06 04:25:04 V9.3 Migration issues