Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oeNzV-0005zI-Bd for pgsql-committers@arkaria.postgresql.org; Fri, 30 Sep 2022 21:56:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oeNzT-0006xd-Ed for pgsql-committers@arkaria.postgresql.org; Fri, 30 Sep 2022 21:56:15 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oeNzT-0006x4-78 for pgsql-committers@lists.postgresql.org; Fri, 30 Sep 2022 21:56:15 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oeNzQ-0000eF-Tl for pgsql-committers@lists.postgresql.org; Fri, 30 Sep 2022 21:56:14 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 28ULuBUR741998; Fri, 30 Sep 2022 17:56:11 -0400 From: Tom Lane To: Peter Geoghegan cc: Jaime Casanova , pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Avoid improbable PANIC during heap_update. In-reply-to: References: <692791.1664573331@sss.pgh.pa.us> Comments: In-reply-to Peter Geoghegan message dated "Fri, 30 Sep 2022 14:39:20 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <741996.1664574971.1@sss.pgh.pa.us> Date: Fri, 30 Sep 2022 17:56:11 -0400 Message-ID: <741997.1664574971@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Peter Geoghegan writes: > On Fri, Sep 30, 2022 at 2:28 PM Tom Lane wrote: >> Ugh ... I think I see the problem. There's still one path through >> RelationGetBufferForTuple that fails to guarantee that it's acquired >> a vmbuffer pin if the all-visible flag becomes set in the otherBuffer. > FWIW it seems possible that the Postgres 15 vacuumlazy.c work that > added lazy_scan_noprune() made this scenario more likely in practice > -- even compared to Postgres 14. Could be, because we haven't seen field reports of this in v14 yet. And there's still no hard evidence of a bug pre-14. Nonetheless, I'm inclined to backpatch to v12 as 34f581c39 was. regards, tom lane