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 1goG1d-0004rM-7s for pgsql-hackers@arkaria.postgresql.org; Mon, 28 Jan 2019 23:09:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1goG1b-0003nf-Tu for pgsql-hackers@arkaria.postgresql.org; Mon, 28 Jan 2019 23:09:07 +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 1goG1b-0003nX-Md for pgsql-hackers@lists.postgresql.org; Mon, 28 Jan 2019 23:09:07 +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 1goG1Z-0000kR-2c for pgsql-hackers@postgresql.org; Mon, 28 Jan 2019 23:09:06 +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 x0SN8xcB026264; Mon, 28 Jan 2019 18:08:59 -0500 From: Tom Lane To: Andres Freund cc: Robert Haas , "pgsql-hackers@postgresql.org" , Amit Kapila Subject: Re: Why are we PageInit'ing buffers in RelationAddExtraBlocks()? In-reply-to: <20190128222259.zhi7ovzgtkft6em6@alap3.anarazel.de> References: <20181219223736.4k2lhqoj34aaxj3m@alap3.anarazel.de> <13071.1545266373@sss.pgh.pa.us> <20181220005636.cowkudhiu666mhdi@alap3.anarazel.de> <20181220230411.zzwioucrg7d3ld2m@alap3.anarazel.de> <20190115204428.kpqmk3ix6cenr7gi@alap3.anarazel.de> <11587.1547591721@sss.pgh.pa.us> <20190128213346.ie6zbwiddgnfd37l@alap3.anarazel.de> <20190128221055.nddkrusu3u5263qo@alap3.anarazel.de> <20190128222259.zhi7ovzgtkft6em6@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Mon, 28 Jan 2019 14:22:59 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <26262.1548716938.1@sss.pgh.pa.us> Date: Mon, 28 Jan 2019 18:08:59 -0500 Message-ID: <26263.1548716939@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Andres Freund writes: > I'm inclined to put back the > LockBuffer(buf, BUFFER_LOCK_UNLOCK); > LockRelationForExtension(onerel, ExclusiveLock); > UnlockRelationForExtension(onerel, ExclusiveLock); > LockBufferForCleanup(buf); > if (PageIsNew(page)) > dance regardless, just to get the buildfarm to green? The buildfarm's got half a dozen reports now of a failure of this ilk, so you'd better do something. > But I do wonder if we should just make hio.c cope with this instead. Probably should not try to go that way under time presssure. regards, tom lane