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 1vTX0g-003wtD-1X for pgsql-hackers@arkaria.postgresql.org; Thu, 11 Dec 2025 03:06:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vTX0e-0022Kx-0k for pgsql-hackers@arkaria.postgresql.org; Thu, 11 Dec 2025 03:06:29 +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 1vTX0d-0022Kp-31 for pgsql-hackers@lists.postgresql.org; Thu, 11 Dec 2025 03:06:28 +0000 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vTX0d-0004he-0B for pgsql-hackers@lists.postgresql.org; Thu, 11 Dec 2025 03:06:27 +0000 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-47795f6f5c0so2421235e9.1 for ; Wed, 10 Dec 2025 19:06:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1765422385; x=1766027185; 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=hSi4R5jDq8AalRQMVqo1lwXlGte59/a3jMpH8wqxhc0=; b=cpxR9Vpqs+wHhry309eeRL7Ypq0B3BVpGpfemIgqIfJUaG33WQyvqJUf+iIEAyiu5h R+FcKDWZQzUQM6SwxZK/N/GqMypObq0UD0gXOgk+ys0Cqj0wt87gb2euu/QxVPKnZ5QL GpFrwrxcbf/MvPIAmqq/GrLTyJSBDxka4cgI/apeupAZ5/vgxPEHRP5a4puhgU6/9Heu eHIHfuiTjhO0W8dno5djbscer2nYcukYZJymqIVJGaHkVIAEUuAdRVwkm/90kZ8kEJxS uyRgQdsMFqiw/b3RxNJv7j7AbkbcjIwco/MADu4F50yLoVoVq2ggDKCiDwBiOOjVIQnz kD+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765422385; x=1766027185; 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=hSi4R5jDq8AalRQMVqo1lwXlGte59/a3jMpH8wqxhc0=; b=eDyn4A0Up3g8ksjH2pw/t3m523nwtKPBWj3XTEj717Bx5+Xt1e1NIbTYQ3ttWqDMru D1x6EuUXFPHdxB9e21t8EYJidrSUHVKRL/C2/oIgk2PxdK4ZhSfKORT61/okyms8WQGL Fc2YRxLDYM4PtQrkXM62okZ/aYt5uehZ8MMylXDu/m1NLkoYKM4Wp+HhCpPLKXl3p7pD 05Ges6ldn43GfnzHjJGBIorxF/5TgVdZGrLlQ6J7nScm6dJM8OREwY2pCEurVA4zvzE2 WeHn+Oofp99wNVr5sKaDmWkkjFVfxFCJ/doPPsb78jYt6R4kf43C9DggZQibxbBSrn/a QRCg== X-Forwarded-Encrypted: i=1; AJvYcCUNX0QPE8pCOwD8cv630U6zB8sFARB2FZcq7gJ5t3Ay8rfAPT0yxKyL3y6TBtKSK8GdAYWuhov1DNsrnK/a@lists.postgresql.org X-Gm-Message-State: AOJu0YzO2i9ucJQb9E/+n92i3nBKuTsEN+OTncaTv2MMvyBWtS7PA3gJ ZqssNggvn7OQU1XsA3vebc7yH/WoGOazFmyH4QpkTmi135NjcQ940GHeFFVxrufD9P/OFo8HTVG DFZRkB2ivFnLZfVFZd+GUFrsi/jvGZWo= X-Gm-Gg: AY/fxX5rh8LoX8PAnh/0ocE5uIva7bwUe89R6sgSA0usaBCmyURQCVimOTJa6mbvOqb +c65WBJgGdfmyU8OZ3Xv2Kf74oITrZ3VJ7zrkp896SGLPtWpr5+kngP4Qohul/gPkhVBGpZuRLd nmeQHa1r2TBU0P6w5O6nvTRZv+D8xZMUfjLFxfdRevJ3HX0S7lGWCuDhbEkUM2xxlmrWFUXCZeV PVYUlqWwRhMucMOaSV75YOb3/Y1EUk+dSKoLTe4h/9SY4GPFn2PuzYWjjI17TpP8qyuNOHC X-Google-Smtp-Source: AGHT+IFABdo6JI4oK9oCW4mK6/1VCxn7MvSPK+8Dq4Jr7J+HPgvjqz81DbDV7jxIpEaQW5CSFtOheHXMLgkKqbh3tXE= X-Received: by 2002:a05:6000:1889:b0:427:167:c2ce with SMTP id ffacd0b85a97d-42fa3b05e62mr4833718f8f.42.1765422385009; Wed, 10 Dec 2025 19:06:25 -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> <3624730d-6dae-42bf-9458-76c4c965fb27@iki.fi> In-Reply-To: From: Ashutosh Bapat Date: Thu, 11 Dec 2025 08:36:11 +0530 X-Gm-Features: AQt7F2rwHQUXbIs1PNThaKvITg7lpl61F3TEH7SoJnOsFYZmn9ZFKs-LVAjCoCM 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 Thu, Dec 11, 2025 at 12:49=E2=80=AFAM Heikki Linnakangas wrote: > > On 09/12/2025 14:00, Heikki Linnakangas wrote: > > 1. Currently, at multixid wraparound, MultiXactState->nextMXact goes to > > 0, which is invalid. All the readers must be prepared for that, and ski= p > > over the 0. That's error-prone, we've already missed that a few times. > > Let's change things so that the code that *writes* MultiXactState- > > >nextMXact skips over the zero already. > > Here's a patch for that. Does anyone see a problem with this? The patch looks fine to me. It simplifies readers without affecting writers much. I was expecting more explanation of why it wasn't done that way to start with and why is it safe to do so (now, if applicable). There must be a reason why we chose to make readers handle invalid mxid instead of writers writing one. If it's for performance reasons then does the new arrangement cause any regression? If it's for safety reasons, are we fixing one set of problems but introducing a new set. I was expecting commit message to answer those questions. --=20 Best Wishes, Ashutosh Bapat