Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cJk54-0001tO-Vu for pgsql-hackers@arkaria.postgresql.org; Wed, 21 Dec 2016 16:49:31 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cJk54-0003dd-8N for pgsql-hackers@arkaria.postgresql.org; Wed, 21 Dec 2016 16:49:30 +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 1cJk52-0003cz-TP for pgsql-hackers@postgreSQL.org; Wed, 21 Dec 2016 16:49:29 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cJk50-00040p-7b for pgsql-hackers@postgreSQL.org; Wed, 21 Dec 2016 16:49:27 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id uBLGnPOC019873 for ; Wed, 21 Dec 2016 11:49:25 -0500 From: Tom Lane To: pgsql-hackers@postgreSQL.org Subject: Getting rid of "unknown error" in dblink and postgres_fdw MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <19871.1482338965.1@sss.pgh.pa.us> Date: Wed, 21 Dec 2016 11:49:25 -0500 Message-ID: <19872.1482338965@sss.pgh.pa.us> X-Pg-Spam-Score: -5.0 (-----) 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 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? 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