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 1vOHMk-000ZRG-15 for pgsql-hackers@arkaria.postgresql.org; Wed, 26 Nov 2025 15:23:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vOHMi-00HPyC-2L for pgsql-hackers@arkaria.postgresql.org; Wed, 26 Nov 2025 15:23:33 +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 1vOHMi-00HPy4-1N for pgsql-hackers@lists.postgresql.org; Wed, 26 Nov 2025 15:23:32 +0000 Received: from mail-qt1-x829.google.com ([2607:f8b0:4864:20::829]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vOHMf-001af9-30 for pgsql-hackers@lists.postgresql.org; Wed, 26 Nov 2025 15:23:31 +0000 Received: by mail-qt1-x829.google.com with SMTP id d75a77b69052e-4ede6ca6f65so13703371cf.0 for ; Wed, 26 Nov 2025 07:23:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1764170610; x=1764775410; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=enSufqFw0tri7tEuzBoeq4MmC0RXvpj1BG1C+Lj8RY0=; b=LcPrQWm+/bZJh4n0lSFoeDWscZrimmIfYd6r8fE5BjLm9sV7ihCDt0I3rmJe8g5CZs qCpx+oKgQgl2bq9l7x7EBXjvcCao7yRwvGdhBdwy9iW3WAWSILVLhhg51dH32SW4derd 6u1RLuiwzdJANaNFCHTsox7V/5E5VK+AMgaA8Jl85nVSfRGDnaJDg5uCnScCmeXL9kgF 8F2Zdu4bgt9eCYg0PRu1MTUrpjPpQJZELE2tTf6Y3D5W3jFiKkvYJSxwDby90hiVotmL 8vSazgaXpguYtH7RrEL8OFv5IQhoUO5OcsZpnXAgnB41lliDclI4uBXDDw0IyXv/BN5w nKBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764170610; x=1764775410; h=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=enSufqFw0tri7tEuzBoeq4MmC0RXvpj1BG1C+Lj8RY0=; b=u9vR97G9hJ1hc2IfYD1rynnag2YgbufG+LqUB0+q7KYiWxckeeTj0TBoVF9wwLF9pI XDTHF/pvIhQnuLbrwwXekK+K2AlvEx/a2e7ISE7s/jTm18na/vs2nrSis5cRudeEOgam opG+va9TAkKiH4ZBd7f86Xu4w7crVdfCAo30xlLSVbxkUxCITTb45uKop6P517kbaZIu Ag0xN8u3gw4R6tULoKBshSMxCcHz5Lh2+qUfLWLoDQO0m8FItDeTJAdwXWo3fFtaIRYy 9ZOlbkfNpwGEQJz9w0Mg4aAqchfEb63uDJDCKeL9I9BNd2TW6i+jBGJYLkeLNLPuKoKH ijiw== X-Forwarded-Encrypted: i=1; AJvYcCVQuS4S7WmM4nXrwOFT4caWEnEl4J6dQsv/qL/ZnjvZurLiJAOq0Mbmr7bX4OQ1uWFvUom+a45XRKijuazT@lists.postgresql.org X-Gm-Message-State: AOJu0Yz0qZ2tLl6iefpEt/fgDk7CPzVQM2xlI07y/HlA/szsW1e1NJez gGOLRToEonye9G0E18yv7hCL1mFgjFEGZJ3WZzIckwkxJDOHOx0gCbW8dhBz5fswjLixEJNyoh5 B0CDCPx/Ux52bE9img5MmbPfoJcs/pAg= X-Gm-Gg: ASbGnctMZqdSaFE36nxc+Hg++TYwRgHYzhKBByZFo1PsZWxD7soSXBXUJDdn/g42hVY pdDf3QmcOF2ng9iorCE9cElM36QdZXCUtJVad6mm5OJXj+72Tswn2ww6qovuJL31u55tuv2bjgv 1sEPR3Fs2hPOOqlEUtZi2FLAztvr76mN2DYmWQOpebO7NI1VPKGJIg9pRDFichbfmQnmZ9OZBEK a7wG20qVYUZM7fNMDe231GOvfi6rwI/ZISs92QfUahiA6Ayq8/jaWfSd8cn6V6vislNXA== X-Google-Smtp-Source: AGHT+IHvN5Jr3+SexFw5TCcZxafxL24+ABO0OSSLulcMUHr9399/369FnpVsXgKvtCl7+jvW4yv3ty2lMfeaJO20Ye4= X-Received: by 2002:a05:622a:1104:b0:4eb:7dac:7b8d with SMTP id d75a77b69052e-4ee5b7494bamr174022191cf.6.1764170609668; Wed, 26 Nov 2025 07:23:29 -0800 (PST) MIME-Version: 1.0 References: <4535f3aa-3220-4760-b1f5-2bc91f248e03@iki.fi> <2bc58592-9d74-4af0-bdd1-1a88e8683f7c@iki.fi> <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> <9ee6324a-44fc-42fb-bf8e-7c3b53395588@iki.fi> In-Reply-To: <9ee6324a-44fc-42fb-bf8e-7c3b53395588@iki.fi> From: Maxim Orlov Date: Wed, 26 Nov 2025 18:23:18 +0300 X-Gm-Features: AWmQ_bmhBxljYbmhsQKFrA-tRn-Y0_vGlNgwzgCeffHd8PcALA6QvYb2XiTyQCU Message-ID: Subject: Re: POC: make mxidoff 64 bits To: Heikki Linnakangas Cc: Alvaro Herrera , Alexander Korotkov , wenhui qiu , Postgres hackers , Ashutosh Bapat Content-Type: multipart/alternative; boundary="0000000000008333e7064480fac7" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000008333e7064480fac7 Content-Type: text/plain; charset="UTF-8" On Tue, 25 Nov 2025 at 13:07, Heikki Linnakangas wrote: > > GetOldMultiXactIdSingleMember() currently asserts that the offset is > never zero, but it should try to do something sensible in that case > instead of just failing. > > Correct me if I'm wrong, but we added the assertion that offsets are never 0, based on the idea that case #2 will never take place during an update. If this isn't the case, this assertion could be removed. The rest of the function appears to work correctly. I even think that, as an experiment, we could randomly reset some of the offsets to zero and nothing would happen, except that some data would be lost. The most sensible thing we can do is give the user a warning, right? Something like, "During the update, we encountered some weird offset that shouldn't have been there, but there's nothing we can do about it, just take note." -- Best regards, Maxim Orlov. --0000000000008333e7064480fac7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

On Tue, 25 Nov 2025= at 13:07, Heikki Linnakangas <hlinna= ka@iki.fi> wrote:
=C2=A0
GetOldMultiXactIdSingleMember() currently asserts that the offset is
never zero, but it should try to do something sensible in that case
instead of just failing.

Correct me if I'm wrong, but we added the asser= tion that offsets are
never 0, based on the idea that case #2 will never= take place during an
update. If this isn't the case, this assertion= could be removed.
The rest of the function appears to work correctly.
I even think that, as an experiment, we could randomly reset some of = the
offsets to zero and nothing would happen, except that some data woul= d
be lost.

The most sensible thing we can do is give the u= ser a warning, right?
Something like, "During the update, we encoun= tered some weird offset
that shouldn't have been there, but there= 9;s nothing we can do about it,
just take note."

--
Best regards,
Maxim Orlov.<= /div>
--0000000000008333e7064480fac7--