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 1lVdMJ-0003Bg-DK for pgsql-hackers@arkaria.postgresql.org; Sun, 11 Apr 2021 16:54:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lVdMI-0006Tj-AJ for pgsql-hackers@arkaria.postgresql.org; Sun, 11 Apr 2021 16:54:50 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lVdMI-0006Tb-3q for pgsql-hackers@lists.postgresql.org; Sun, 11 Apr 2021 16:54:50 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lVdMF-0002Wy-JY for pgsql-hackers@lists.postgresql.org; Sun, 11 Apr 2021 16:54:49 +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 13BGsj0s2689165 for ; Sun, 11 Apr 2021 12:54:45 -0400 From: Tom Lane To: pgsql-hackers@lists.postgresql.org Subject: Possible SSI bug in heap_update MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2689163.1618160085.1@sss.pgh.pa.us> Date: Sun, 11 Apr 2021 12:54:45 -0400 Message-ID: <2689164.1618160085@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk While re-reading heap_update() in connection with that PANIC we're chasing, my attention was drawn to this comment: /* * Note: beyond this point, use oldtup not otid to refer to old tuple. * otid may very well point at newtup->t_self, which we will overwrite * with the new tuple's location, so there's great risk of confusion if we * use otid anymore. */ This seemingly sage advice is being ignored in one place: CheckForSerializableConflictIn(relation, otid, BufferGetBlockNumber(buffer)); I wonder whether that's a mistake. There'd be only a low probability of our detecting it through testing, I fear. regards, tom lane