Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YdTL7-0007AZ-On for pgsql-bugs@arkaria.postgresql.org; Thu, 02 Apr 2015 00:50:33 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YdTL6-0003N8-MC for pgsql-bugs@arkaria.postgresql.org; Thu, 02 Apr 2015 00:50:32 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YdTL6-0003My-0C for pgsql-bugs@postgresql.org; Thu, 02 Apr 2015 00:50:32 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1YdTL2-0003Rq-Cf for pgsql-bugs@postgresql.org; Thu, 02 Apr 2015 00:50:29 +0000 Received: from bruce by momjian.us with local (Exim 4.72) (envelope-from ) id 1YdTKz-0000nP-P6; Wed, 01 Apr 2015 20:50:25 -0400 Date: Wed, 1 Apr 2015 20:50:25 -0400 From: Bruce Momjian To: Tom Lane Cc: Andrew Gierth , pgsql-bugs@postgresql.org, brian.johnson@emolhealth.com, aaron.thul@emolhealth.com Subject: Re: 9.4 and reproducible "ERROR: could not read block 0 in file..." Message-ID: <20150402005025.GA29404@momjian.us> References: <87tx0dc80x.fsf@news-spur.riddles.org.uk> <15824.1419970310@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <15824.1419970310@sss.pgh.pa.us> User-Agent: Mutt/1.5.20 (2009-06-14) X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On Tue, Dec 30, 2014 at 03:11:50PM -0500, Tom Lane wrote: > So there are two separate bugs/symptoms here, but I think we can > fix both of them with one change: we need the new index to appear > invalid for queries/updates until we're done building it. We > could implement that (in 9.2 and later) by creating the pg_index > row with indislive = false and updating it to true after the build > completes; but that's a tad annoying since it means every index build > leaves a dead pg_index row behind. (Unless we do the update in-place, > which I think would work but it's still pretty ugly.) > > Or we could hack things up by having RelationGetIndexList consult some > internal-to-the-backend state so that it knows which index builds are > in-progress and leaves those indexes out of the indexlist. That seems > a bit messy too, but it would avoid one catalog update, and would stand > a better chance of being back-patchable to before 9.2. Uh, where are we on this? -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + Everyone has their own god. + -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs