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 1vSdVY-002Mhm-15 for pgsql-hackers@arkaria.postgresql.org; Mon, 08 Dec 2025 15:50:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vSdVW-000HIX-2W for pgsql-hackers@arkaria.postgresql.org; Mon, 08 Dec 2025 15:50:39 +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 1vSdVW-000HIO-1Y for pgsql-hackers@lists.postgresql.org; Mon, 08 Dec 2025 15:50:38 +0000 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vSdVU-003mNW-0v for pgsql-hackers@lists.postgresql.org; Mon, 08 Dec 2025 15:50:37 +0000 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-4775895d69cso23036295e9.0 for ; Mon, 08 Dec 2025 07:50:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1765209035; x=1765813835; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=U/lOyBmNS28E65votIkJucGAZtQzB5T53vcA7F43EBY=; b=L0ajqcgaYIHZx33NuOBLx6zQkyOoOLarllyShO3VSGNxGZzHUlJ1xTI69EZT/W1iBg KjhDH15fBmoqCzERjZWr3fFE3XAWqI9AQSOaEUJ7aXcU69jVJfNOQL6Nh69RPEXdYZXt XjBk6IHHf2zgQpjDeY3qJAOkRFD+wEh+oKSsw/G+voeTZv+KzbyBmnEcPKnjna5Gfh34 GsIGonbBeujQwsNauVfYp9aTtG0kbAz+qoXiWRMkaylpWin3DLXweN6M065qTrfGmC6c PK11iCs2C9JovOCBB+l0SJDYwwfKgU+LnCtHoexhmRCGKh4gY3bDdfFKZDt2AL6ILj0G o/kQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765209035; x=1765813835; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=U/lOyBmNS28E65votIkJucGAZtQzB5T53vcA7F43EBY=; b=RrE4526Bux6DsemNhdUkNxgotepr3NILsrT/jt/xsVtlFIMGbnudZTVnSx7TAVryIw HaFAn/qXZIDFu+xNbaDAlsZ9EBfBt9umwSjLdOmJDg5K76V2lhttRlkB5zcLU1WOFBij fwpqtEV5fY7SNdoCKbjsC+UpP0ZcsXBivV8+hI01OaVdtGdeaaU72l2uuasTN0s0Uf/7 QIIW1kPfYmiqWZHyajwl6bNXwDIv2lo3/i5Zp9cOvNGDIXTOmM4S5AGPa3O2VrXaXuyx kl5sPhp7CwiC56XNuYsL31aUR5bY0CXO3x0QaIaib1UTqVNTQkOCHfGP2QmVLMg+k+5O rKeA== X-Forwarded-Encrypted: i=1; AJvYcCWAckt+y9x+kogKLW5OueGGNbYm4rs9eojQVhQCW6rdJ05JOxmAzUmz/OsLDX1zjmT4n+DmAR2VefvE1C1q@lists.postgresql.org X-Gm-Message-State: AOJu0Yy29AxoOvISWai47ztsgA4O0CnqIgH9PCaq5BH4dmexrgKFSpjl 6ivY15Z7C4ftY+plKwoVTSted3oaLbhBP5M32A+jQ3Fn66sK2DjfNpGfR2Kco5Wc6nUDDVbEDME uCOAjoa5sUZhjx7wgzcHtuEB5YMAzLbM= X-Gm-Gg: ASbGncunqFAsglR5j65t5Y+wjftv+yd8Mhd3GN8JKNwXsEmLQh4yWJpAtC7D/aW6CtM jRQrLcByJpaxU81ucunS8nrFdh8n1QdimShPZFUmllLn3CU0B59N+KqoTIMHK0dagIq7Y/cTTkc dArP9YHkJr66/Lvco/DmA/0lzs+s89ZAK0DEHO9hIt7zJm11Q58vw8KOxBMkQ5KXtOXDzIOj1i2 33vr5tnLlxMx8y0hskvX7Jcn1v6BMX4M3A8xhTU338iEpjYuVK1bmdBH6wwWx40wb/uYU9h X-Google-Smtp-Source: AGHT+IEmE1JlnBHv/WcwmM7V0BJ8yrx0ZL8JP1VxHRhVgUXzK218C/QHz4v71pSykPZ/QytMaG4t/bhFY9mRP8IHYps= X-Received: by 2002:a05:6000:1843:b0:429:cbba:b246 with SMTP id ffacd0b85a97d-42f89eeaacamr8197610f8f.0.1765209035473; Mon, 08 Dec 2025 07:50:35 -0800 (PST) MIME-Version: 1.0 References: <36531c0e-292c-409d-bbc7-a252cf6e910a@iki.fi> <54aa8f65-f0e4-4464-b543-e0399c1cab1e@iki.fi> <4a9dda70-0af7-41a4-9636-b168f2fc48ef@iki.fi> <46cc45e9-fddd-44bc-bcb3-96889aafd921@iki.fi> <6c298bc4-7029-4c1d-bf16-3e094842ce32@iki.fi> <2c62322e-a0e3-49cd-b369-370718a8efd8@iki.fi> <22d30907-03b0-47c7-b38e-5574e475a387@iki.fi> In-Reply-To: <22d30907-03b0-47c7-b38e-5574e475a387@iki.fi> From: Ashutosh Bapat Date: Mon, 8 Dec 2025 21:20:23 +0530 X-Gm-Features: AQt7F2rG2x1DgkO45-OdyPrkexenU1KXWDx9KLAEsbML9QDU_PICyX5AgOUYnIo Message-ID: Subject: Re: POC: make mxidoff 64 bits To: Heikki Linnakangas Cc: Maxim Orlov , Alvaro Herrera , Alexander Korotkov , wenhui qiu , Postgres hackers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Dec 8, 2025 at 6:32=E2=80=AFPM Heikki Linnakangas = wrote: > > On 06/12/2025 01:36, Heikki Linnakangas wrote: > > On 05/12/2025 15:42, Ashutosh Bapat wrote: > >> + $newnode->start; > >> + my $new_dump =3D get_dump_for_comparison($newnode, "newnode_${tag} > >> _dump"); > >> + $newnode->stop; > >> > >> > >> There is no code which actually looks at the multixact offsets here to > >> make sure that the conversion happened correctly. I guess the test > >> relies on visibility checks for that. Anyway, we need a comment > >> explaining why just comparing the contents of the table is enough to > >> ensure correct conversion. Better if we can add an explicit test that > >> the offsets were converted correctly. I don't have any idea of how to > >> do that right now, though. Maybe use pg_get_multixact_members() > >> somehow in the query to extract data out of the table? > > > > Agreed, the verification here is quite weak. I didn't realize that > > pg_get_multixact_members() exists! That might indeed be handy here, but > > I'm not sure how exactly to construct the test. A direct C function lik= e > > test_create_multixact() in test_multixact.c would be handy here, but > > we'd need to compile and do run that in the old cluster, which seems > > difficult. > > I added verification of all the multixids between oldest and next > multixid, using pg_get_multixact_members(). The test now calls > pg_get_multixact_members() for all updating multixids in the range, > before and after the upgrade, and compares the results. I thought about adding pg_get_multixact_member in get_test_table_contents() itself like SELECT ctid, xmin, xmax, get_multixact_member(xmin), get_multixact_member(xmax) * FROM mxofftest; but then I realized that the UPDATE would replace mxids by actual transaction ids in the visible rows. So that can't be used. What you have done doesn't have that drawback, but it's also not checking whether the multixids in (invisible) rows are reachable in offsets and members. But probably that's too hard to do and is covered by visibility checks. --=20 Best Wishes, Ashutosh Bapat