pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: Getting rid of "unknown error" in dblink and postgres_fdw
Date: Wed, 21 Dec 2016 12:05:34 -0500
Message-ID: <20648.1482339934@sss.pgh.pa.us> (raw)
In-Reply-To: <CAKFQuwYUTXOfGsxCmWHVOB8hFOoW1uvJDGh5k1GLSGaUmKuC+Q@mail.gmail.com>
References: <19872.1482338965@sss.pgh.pa.us>
	<CAKFQuwYUTXOfGsxCmWHVOB8hFOoW1uvJDGh5k1GLSGaUmKuC+Q@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Wed, Dec 21, 2016 at 9:49 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> A possible objection is that if we really are on the hairy edge of OOM,
>> trying to construct such error strings might push us over the edge

> What am I missing here?  Constructing said string occurs on the local end
> of the connection but the memory problem exists on the remote end.

Um, that's not clear, in fact it's not likely.  The backend usually
manages to tell you so if it's out of memory --- or, worst case, it
crashes trying, in which case the local libpq ought to gin up a report
about loss of connection.  So the root cause I'm suspecting is that
the local libpq was unable to obtain memory for a PGresult or something
like that.  That theory has some holes of its own, because libpq also
keeps some cards up its sleeve that usually let it report out-of-memory
successfully, but it's the best I can do with the info at hand.

In any case, the point of the error style guidelines is that it's *always*
possible to do better than "unknown error"; now that it's been proven
that this case is reachable in the field, we should try harder.

			regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (15+ messages)  latest in thread

Message-ID: <20648.1482339934@sss.pgh.pa.us>
Permalink:  ../20648.1482339934@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/20648.1482339934@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-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, david.g.johnston@gmail.com
  Subject: Re: Getting rid of "unknown error" in dblink and postgres_fdw
  In-Reply-To: <20648.1482339934@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 DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox