Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cJkcU-0003HQ-Bu for pgsql-hackers@arkaria.postgresql.org; Wed, 21 Dec 2016 17:24:02 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cJkcT-0006zx-Ru for pgsql-hackers@arkaria.postgresql.org; Wed, 21 Dec 2016 17:24:01 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cJkb3-0003Bp-8e for pgsql-hackers@postgresql.org; Wed, 21 Dec 2016 17:22:33 +0000 Received: from 104-190-1-44.lightspeed.sndgca.sbcglobal.net ([104.190.1.44] helo=joeconway.com) by makus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cJkaz-0004nu-ID for pgsql-hackers@postgresql.org; Wed, 21 Dec 2016 17:22:32 +0000 Received: from [72.214.29.243] (account jconway@joeconway.com HELO [192.168.4.41]) by joeconway.com (CommuniGate Pro SMTP 6.1.4) with ESMTPSA id 17590826; Wed, 21 Dec 2016 09:22:26 -0800 Subject: Re: Getting rid of "unknown error" in dblink and postgres_fdw To: Tom Lane , pgsql-hackers@postgreSQL.org References: <19872.1482338965@sss.pgh.pa.us> From: Joe Conway Openpgp: id=4EA5B4659ED59CC9538139A5332B7E68B699434A Message-ID: Date: Wed, 21 Dec 2016 09:22:25 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <19872.1482338965@sss.pgh.pa.us> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="W7ULlnclAWNDXslv6TVews5776c7K9IAg" X-Pg-Spam-Score: -0.9 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --W7ULlnclAWNDXslv6TVews5776c7K9IAg From: Joe Conway To: Tom Lane , pgsql-hackers@postgreSQL.org Message-ID: Subject: Re: [HACKERS] Getting rid of "unknown error" in dblink and postgres_fdw References: <19872.1482338965@sss.pgh.pa.us> In-Reply-To: <19872.1482338965@sss.pgh.pa.us> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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. >=20 > 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.) >=20 > I propose that we should change that string to "could not obtain message > string for error on connection "foo"", or something along that line. >=20 > 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. >=20 > 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. >=20 > Comments? Seems reasonable to me. I can work on it if you'd like. Do you think this should be backpatched? Joe --=20 Crunchy Data - http://crunchydata.com PostgreSQL Support for Secure Enterprises Consulting, Training, & Open Source Development --W7ULlnclAWNDXslv6TVews5776c7K9IAg Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJYWrpRAAoJEDfy90M199hl0ogQAI1EjftYzmJZZ0gKqal60D8j phFKyxlcvlmhmBJ5ECpf/4ytASatCfK9K++O5SIoCylLILwCLLsa9q+R65WgtC6Z 18wrihu4gfDxXa1M1+ur6g8Zzwr90zZCG487STmh3X6bb7FZYhQjVGHeINE1M5Df oWY/74pHxDzC6HfsM+CsHkuI+aCUZIWggtDCq66tLoFDsdg3eEsqm6uu7BkNyZsJ S1ySwuv18yPzQoac0XxVML/uWYCi/A2qxDQxV7WXRuPE9it8oDI53/mFads8zZ1p F9ZtweAF99106mbguymw1NLc9SYy9g2aYpZMEfW62RWKxHJKyXQlioEWc1BntDtU 5K1ji8744ig2f9QihATpOgBP6KQjv525VOKymBzVX1cPx0KsfM8ED3f3qXdS+n9b Vwl0iEBD4KnCFmtlixpB42bI7fMZsLqA2gr0f1AhqydIJtaOhP03bqxjEAEOzZWj ioMQtwO6GJgLL71XkujaTx0aB/pi9BZ33NZ+wLN7pcVMugXYwumdeb2keP2H4ww7 6czy0JyL4pl2oRh+RI84jAfqqGZzEuPQW2LGmo1i6e7wNwDUr0mnwDEsR0Sv7/4j ZTHrSI646sm4wKe3TVVnt3hq3XNG2uogDZiETfrkI8D6W2hbsRAoaKxF9NrWqNfy VDe6rUYXB7xxl2CLoLzt =6myG -----END PGP SIGNATURE----- --W7ULlnclAWNDXslv6TVews5776c7K9IAg--