Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vUv0D-008xH6-1l for pgsql-hackers@arkaria.postgresql.org; Sun, 14 Dec 2025 22:55:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vUv0B-00EZIn-2D for pgsql-hackers@arkaria.postgresql.org; Sun, 14 Dec 2025 22:55:44 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vUv0B-00EZIf-1E for pgsql-hackers@lists.postgresql.org; Sun, 14 Dec 2025 22:55:44 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vUv0A-000gg9-2A for pgsql-hackers@lists.postgresql.org; Sun, 14 Dec 2025 22:55:43 +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 5BEMtaSV1827756; Sun, 14 Dec 2025 17:55:36 -0500 From: Tom Lane To: Heikki Linnakangas cc: Alvaro Herrera , Ashutosh Bapat , Maxim Orlov , Alexander Korotkov , wenhui qiu , Postgres hackers Subject: Re: POC: make mxidoff 64 bits In-reply-to: <2d9282d3-7f24-4e1c-af5f-cd33316dead7@iki.fi> References: <202512110804.hmukvd7jna34@alvherre.pgsql> <2d9282d3-7f24-4e1c-af5f-cd33316dead7@iki.fi> Comments: In-reply-to Heikki Linnakangas message dated "Fri, 12 Dec 2025 10:51:25 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1827754.1765752936.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sun, 14 Dec 2025 17:55:36 -0500 Message-ID: <1827755.1765752936@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Heikki Linnakangas writes: > Ok, I have pushed this. Thanks! Coverity is unhappy about this bit: /srv/coverity/git/pgsql-git/postgresql/src/bin/pg_upgrade/multixact_read_v= 18.c: 282 in GetOldMultiXactIdSingleMember() 276 if (!TransactionIdIsValid(*xactptr)) 277 { 278 /* 279 * Corner case 2: we are looking at unused slot zero 280 */ 281 if (offset =3D=3D 0) >>> CID 1676077: Control flow issues (DEADCODE) >>> Execution cannot reach this statement: "continue;". 282 continue; 283 = 284 /* 285 * Otherwise this is an invalid entry that should not = be It sees the earlier test for offset =3D=3D 0, and evidently is assuming that the loop's "offset++" will not wrap around. Now I think that the point of this check is exactly that "offset++" could have wrapped around, but the commentary is not so clear that I'm certain this is a false positive. If that is the intention, what do you think of rephrasing this comment as "we have wrapped around to unused slot zero"? regards, tom lane