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 1ndwli-0006kk-8n for pgsql-bugs@arkaria.postgresql.org; Mon, 11 Apr 2022 16:19:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ndwlh-0005SE-40 for pgsql-bugs@arkaria.postgresql.org; Mon, 11 Apr 2022 16:19:57 +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 1ndwlg-0005S5-Rs for pgsql-bugs@lists.postgresql.org; Mon, 11 Apr 2022 16:19:56 +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 1ndwle-00039s-OJ for pgsql-bugs@lists.postgresql.org; Mon, 11 Apr 2022 16:19:55 +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 23BGJpBE288545; Mon, 11 Apr 2022 12:19:51 -0400 From: Tom Lane To: Andres Freund cc: anisimow.d@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17462: Invalid memory access in heapam_tuple_lock In-reply-to: <286748.1649692519@sss.pgh.pa.us> References: <17462-9c98a0f00df9bd36@postgresql.org> <286748.1649692519@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Mon, 11 Apr 2022 11:55:19 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <288543.1649693991.1@sss.pgh.pa.us> Date: Mon, 11 Apr 2022 12:19:51 -0400 Message-ID: <288544.1649693991@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk I wrote: > Reproduced here. It's surprising that nobody noticed this before, > because AFAICS the bug is pretty old: it dates to somebody foolishly > deciding that heap_fetch didn't need its keep_buf argument, which > evidently happened in v12 (didn't track down the exact commit yet). The blame falls on Andres' commit 5db6df0c0. There is no commentary there justifying this change, and I judge the amount of thought that went into it by noting that that commit removed the argument without removing the header comment explaining it. regards, tom lane