pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Joe Conway <mail@joeconway.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-hackers@postgreSQL.org
Subject: Re: Getting rid of "unknown error" in dblink and postgres_fdw
Date: Wed, 21 Dec 2016 09:22:25 -0800
Message-ID: <dfa45c48-659c-caa8-76de-06006707c3aa@joeconway.com> (raw)
In-Reply-To: <19872.1482338965@sss.pgh.pa.us>
References: <19872.1482338965@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

On 12/21/2016 08:49 AM, Tom Lane wrote:
> We have a report in pgsql-general of a dblink query failing with
> 	ERROR: unknown error
> This is, to say the least, unhelpful.  And it violates our error
> message style guidelines.
> 
> Where that is coming from is a situation where we've failed to extract
> any primary message from a remote error.  (I theorize that today's report
> is triggered by an out-of-memory situation, but that's only an unsupported
> guess at the moment.)
> 
> I propose that we should change that string to "could not obtain message
> string for error on connection "foo"", or something along that line.
> 
> postgres_fdw has the same disease.  It wouldn't have the notion of a named
> connection, but maybe we could insert the foreign server name instead.
> 
> 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 and
> then you get "out of memory" instead.  But IMO that's not worse; it
> could be argued to be a more useful description of the problem.
> 
> Comments?

Seems reasonable to me. I can work on it if you'd like. Do you think
this should be backpatched?

Joe


-- 
Crunchy Data - http://crunchydata.com
PostgreSQL Support for Secure Enterprises
Consulting, Training, & Open Source Development

Attachments:

  [application/pgp-signature] signature.asc (818B, ../dfa45c48-659c-caa8-76de-06006707c3aa@joeconway.com/2-signature.asc)
  download

view thread (15+ messages)  latest in thread

Message-ID: <dfa45c48-659c-caa8-76de-06006707c3aa@joeconway.com>
Permalink:  ../dfa45c48-659c-caa8-76de-06006707c3aa@joeconway.com/
Also on:    postgresql.org/message-id/dfa45c48-659c-caa8-76de-06006707c3aa@joeconway.com

 · 

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: mail@joeconway.com, tgl@sss.pgh.pa.us
  Subject: Re: Getting rid of "unknown error" in dblink and postgres_fdw
  In-Reply-To: <dfa45c48-659c-caa8-76de-06006707c3aa@joeconway.com>

* 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