Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bpjFK-000227-UU for pgsql-general@arkaria.postgresql.org; Thu, 29 Sep 2016 21:52:03 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bpjFK-0008MS-Ad for pgsql-general@arkaria.postgresql.org; Thu, 29 Sep 2016 21:52:02 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bpjFJ-0008MF-RI; Thu, 29 Sep 2016 21:52:01 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bpjFH-0000Ot-BC; Thu, 29 Sep 2016 21:52:01 +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 u8TLpreK014049; Thu, 29 Sep 2016 17:51:53 -0400 From: Tom Lane To: Alvaro Herrera cc: Thomas Kellerer , pgsql-general@postgresql.org, pgsql-hackers@postgresql.org Subject: Re: [HACKERS] pg_upgrade from 9.5 to 9.6 fails with "invalid argument" In-reply-to: <20160929214015.GA446237@alvherre.pgsql> References: <20160929214015.GA446237@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Thu, 29 Sep 2016 18:40:15 -0300" Date: Thu, 29 Sep 2016 17:51:53 -0400 Message-ID: <14048.1475185913@sss.pgh.pa.us> X-Pg-Spam-Score: -4.9 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-general Precedence: bulk Sender: pgsql-general-owner@postgresql.org Alvaro Herrera writes: > Moreover I think getErrorText() as a whole is misconceived and should be > removed altogether (why pstrdup the string?). Indeed. I think bouncing the error back to the caller is misguided to start with, seeing that the caller is just going to do pg_fatal anyway. We should rewrite these functions to just error out internally, which will make it much easier to provide decent error reporting indicating which call failed. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general