Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fw7IL-0002AF-9j for pgsql-hackers@arkaria.postgresql.org; Sat, 01 Sep 2018 14:54:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fw7II-0001dv-9f for pgsql-hackers@arkaria.postgresql.org; Sat, 01 Sep 2018 14:54:34 +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.89) (envelope-from ) id 1fw7II-0001dc-2n for pgsql-hackers@lists.postgresql.org; Sat, 01 Sep 2018 14:54:34 +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.89) (envelope-from ) id 1fw7IF-0007V4-3d for pgsql-hackers@lists.postgresql.org; Sat, 01 Sep 2018 14:54:33 +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 w81EsP7f030650; Sat, 1 Sep 2018 10:54:25 -0400 From: Tom Lane To: Andres Freund cc: Tomas Vondra , Peter Geoghegan , PostgreSQL Hackers Subject: Re: buildfarm: could not read block 3 in file "base/16384/2662": read only 0 of 8192 bytes In-reply-to: <20180901002101.ph6cngswhqfmpaeh@alap3.anarazel.de> References: <20180828075213.yqyl3w2gpd5heopd@alap3.anarazel.de> <20180829025658.brk3hfdczo3f73al@alap3.anarazel.de> <6970.1535512705@sss.pgh.pa.us> <20180829032714.6yu3bxdywcvyj2li@alap3.anarazel.de> <20180829032908.o46wdjmti6c6dfep@alap3.anarazel.de> <20180829083730.n645apqhb2gyih3g@alap3.anarazel.de> <17825.1535556627@sss.pgh.pa.us> <25024.1535579899@sss.pgh.pa.us> <20180831221331.3l22nwxrokqeujav@alap3.anarazel.de> <14904.1535759623@sss.pgh.pa.us> <20180901002101.ph6cngswhqfmpaeh@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Fri, 31 Aug 2018 17:21:01 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <30648.1535813665.1@sss.pgh.pa.us> Date: Sat, 01 Sep 2018 10:54:25 -0400 Message-ID: <30649.1535813665@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Andres Freund writes: > One concern I have with your approach is that it isn't particularly > bullet-proof for cases where the rebuild is triggered by something that > doesn't hold a conflicting lock. Wouldn't that be a bug in the something-else? The entire relation cache system is based on the assumptions that (a) if you hold lock, you can read a consistent and valid set of information about the rel from the catalogs, and (b) anyone changing that info must hold a conflicting lock and send an SINVAL message *before* releasing said lock. I'm not prepared to consider a redesign of those assumptions, especially not for back-patching. regards, tom lane