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 1ndzf8-0000b8-Rb for pgsql-bugs@arkaria.postgresql.org; Mon, 11 Apr 2022 19:25:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ndzf7-00064A-ET for pgsql-bugs@arkaria.postgresql.org; Mon, 11 Apr 2022 19:25:21 +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 1ndzf7-000641-5G for pgsql-bugs@lists.postgresql.org; Mon, 11 Apr 2022 19:25:21 +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 1ndzf2-0004sL-0H for pgsql-bugs@lists.postgresql.org; Mon, 11 Apr 2022 19:25:20 +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 23BJPC6l496873; Mon, 11 Apr 2022 15:25:12 -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: <20220411190042.o5ebdhc5qsejleff@alap3.anarazel.de> References: <17462-9c98a0f00df9bd36@postgresql.org> <286748.1649692519@sss.pgh.pa.us> <288544.1649693991@sss.pgh.pa.us> <20220411173417.ocwjn5xrkqqjiysl@alap3.anarazel.de> <352840.1649699498@sss.pgh.pa.us> <20220411190042.o5ebdhc5qsejleff@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Mon, 11 Apr 2022 12:00:42 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <496871.1649705112.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 11 Apr 2022 15:25:12 -0400 Message-ID: <496872.1649705112@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Andres Freund writes: > Another approach is to extend the SatisfiesDirty approach and store the = tid of > the next tuple version in addition the xmin/xmax we already store. And h= ave > heap_fetch() always set t_data to NULL if the snapshot check fails. That seems like a fairly clean idea, although I think we can't use it in the back branches without an ABI break. We're not going to find a TID's worth of padding space in struct SnapshotData. regards, tom lane