Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gS70U-0007uD-8G for pgsql-bugs@arkaria.postgresql.org; Wed, 28 Nov 2018 21:04:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gS70S-0001hc-UK for pgsql-bugs@arkaria.postgresql.org; Wed, 28 Nov 2018 21:04:24 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1gS70S-0001hV-OC for pgsql-bugs@lists.postgresql.org; Wed, 28 Nov 2018 21:04:24 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gS70Q-0008P3-F1 for pgsql-bugs@lists.postgresql.org; Wed, 28 Nov 2018 21:04:24 +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 wASL4627014790; Wed, 28 Nov 2018 16:04:06 -0500 From: Tom Lane To: Peter Geoghegan cc: Thomas Munro , paul.vanderlinden@mapcreator.eu, PostgreSQL mailing lists , Heikki Linnakangas Subject: Re: BUG #15460: Error while creating index or constraint In-reply-to: References: <15460-b6db80de822fa0ad@postgresql.org> <26974.1540826748@sss.pgh.pa.us> Comments: In-reply-to Peter Geoghegan message dated "Wed, 28 Nov 2018 11:31:48 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <14788.1543439046.1@sss.pgh.pa.us> Date: Wed, 28 Nov 2018 16:04:06 -0500 Message-ID: <14789.1543439046@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Peter Geoghegan writes: > On Mon, Oct 29, 2018 at 8:25 AM Tom Lane wrote: >> So there are a couple of things to complain about here with respect >> to the error message, regardless of the underlying bug: > Attached patch fixes the problems with BufFileSize(), while also > making similar adjustments to a closely related buffile.c "ereport() + > errcode_for_file_access()" in passing -- the ereport() from > BufFileOpenShared(). Note that both BufFileOpenShared() and > BufFileSize() are used in a closely coordinated way already -- we > literally call one immediately after the other from logtape.c. I don't > like the current inconsistency in error handling. LGTM. regards, tom lane