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 1vTg5Y-007Rvt-1i for pgsql-hackers@arkaria.postgresql.org; Thu, 11 Dec 2025 12:48:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vTg5X-003lu9-1U for pgsql-hackers@arkaria.postgresql.org; Thu, 11 Dec 2025 12:48:08 +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 1vTg5X-003lu0-0a for pgsql-hackers@lists.postgresql.org; Thu, 11 Dec 2025 12:48:07 +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 1vTg5W-00091B-2E for pgsql-hackers@lists.postgresql.org; Thu, 11 Dec 2025 12:48:07 +0000 Received: by mail-qt1-x829.google.com with SMTP id d75a77b69052e-4ee0fd2edd6so89151cf.1 for ; Thu, 11 Dec 2025 04:48:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1765457285; x=1766062085; 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=dCbrCpUQLWW9a8mmAaV4C1UlCDoH+PZ9lrKUe7Z1PLU=; b=ZpJXEbr1UFKUzLbHhURyS/1PYzM3bwPecMlbV9cj+GBjc90wgDhcMOAWKpxwAd8yyP Exu6xm9hwqpkfy6IY986tL3WmeSy0MNPNoihrB71qza3MpGdxPBvVAvIxHelWiLPcBy1 HoGZHyLiB9f/iMxCPMa5kvvckdFim/YReKJiIe/ENJ0tXyI5Ozi9hHWkGWWEvNBp/i2t 3QQKj7fmS39KS3GfRkzZdVYG1t9qfB8xX26t8VrcnoE6RysvfqEuWYI83wF7QgJYKg4h HfwA40D/T+vkQniuZHS7ggb/qTOmZ7OHVw8Ixs4i9gEYKSFXDNycf8Wmh04G35Eyb3Sn NjLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765457285; x=1766062085; 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=dCbrCpUQLWW9a8mmAaV4C1UlCDoH+PZ9lrKUe7Z1PLU=; b=sTZeTJMuHuawi+cXdpr8wWdV7dIlH3g44ubGmUvfALBLPn0/Ei/fXe/3w1Yfw3ESVX 9/CqQMoAvxc1KyRYyRwMZUmJJdP3/hVV4yqmR3yzoOAgTJm9fuksgTqruIjJjWWjayrr wHuOOcOE/45duFGmToCvtVzeXq82b6Y93NMwoK2Hg/mbHac4Fa9t0Nf3DV/D9X3Krv1f j+dmIQRQgn2K++FEfxzff6DruW0BO748s9/z8rGJApY5RMDkBu0CpNvrHcgECORLfmBA RRI/xCU0h1YZVhgz89q6LRmHOdOkZVYESQd2hQlQoT63IofFyJm5XypBSV+tB+pVXfrh I/0A== X-Forwarded-Encrypted: i=1; AJvYcCXC5YwezQdbjs2/kWC3HnRlnrXrc4cITu6ppUR2xJeaougSiHrFe+qH3p7Q3N81iDB5d7PxmpR99rQVY3q0@lists.postgresql.org X-Gm-Message-State: AOJu0YwC2lGBx9KI5gxxx6T2M8NzAvb4SWKyhK9nSDjWp2NFxt0NCsmp glVOe3v0dd3ACQGvyMnwuU8qIRpTQPLPKjZDEW9fMGuKG1anfRWqXaBeJtyjHFJFW9Evvw11ztt D/jEPj47UPquWsKdphpG5a+LmJP+bj5w= X-Gm-Gg: AY/fxX6W6E6WoU6v0hun4GeDRBC1g14guw1wLyiRBGR4kWVRcAfkqgPiiCbEB0cGyOe 8wD/v4Zow103STVakddTGuyBmRiEDxLq9dIrjooilWOsxR/b8PGmICYr0MaIHB9B28hzuuy20sd WwbWT5c8ai60dRkp5w4dqGCAHvTP9PLmL+iloPgQetNc02E5foJdUc9kUwalE8SzGeo1vS8eqZi 6geFK3O1GNzJ3fKTDcNlQSqK8zzWYgCkkxge8ixDIkaCNp6sY4AwQGfZ+8IzK6bfWYtxg== X-Google-Smtp-Source: AGHT+IHxuTFyxiZy/Zl/MjhtRp2w6Q/ZTTMp3G9ekYAAPXtt8Fq9NMonDo5w0MpDV9HWrZ7E0MfIUuOciYIlKOmJDqM= X-Received: by 2002:ac8:5dd0:0:b0:4ed:67c4:b7b9 with SMTP id d75a77b69052e-4f1be2554f4mr25868961cf.1.1765457285463; Thu, 11 Dec 2025 04:48:05 -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> <2c7d4202-31d4-4254-8ed0-484083b14624@iki.fi> In-Reply-To: <2c7d4202-31d4-4254-8ed0-484083b14624@iki.fi> From: Maxim Orlov Date: Thu, 11 Dec 2025 15:47:53 +0300 X-Gm-Features: AQt7F2rmgfsiuyP6TrCdRExVwvvmt0WrVSwYMvCWu8-AQDRGKPefQzt3CT6NLio Message-ID: Subject: Re: POC: make mxidoff 64 bits To: Heikki Linnakangas Cc: Ashutosh Bapat , Alvaro Herrera , Alexander Korotkov , wenhui qiu , Postgres hackers Content-Type: multipart/alternative; boundary="0000000000005dc2ba0645ac8e6d" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000005dc2ba0645ac8e6d Content-Type: text/plain; charset="UTF-8" On Thu, 11 Dec 2025 at 10:58, Heikki Linnakangas wrote: > > That's a great question and I've been wondering about it myself. It goes > all the way to the initial commit where multixacts were introduced, and > I don't see any particular reason for it even back then. Even in the > very first version of multixact.c, IMO it would've been simpler to have > the writer handle the wraparound. > > +1 This code is quite old. I don't see any particular reason for doing it that way. Unfortunately, we were unable to prove the absence of something, namely errors, in this instance. But there were no obvious statements on why it should be in this manner. So, for me, it's much clearer to increment and handle wraparound in one place rather than spread it across multiple calls in the module. -- Best regards, Maxim Orlov. --0000000000005dc2ba0645ac8e6d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

On Thu, 11 Dec 2025= at 10:58, Heikki Linnakangas <hlinna= ka@iki.fi> wrote:

That's a great question and I've been wondering about it myself. It= goes
all the way to the initial commit where multixacts were introduced, and I don't see any particular reason for it even back then. Even in the very first version of multixact.c, IMO it would've been simpler to have=
the writer handle the wraparound.

+1 This code is quite old. I don't see any part= icular reason for doing
it that way. Unfortunately, we were unable to pr= ove the absence of
something, namely errors, in this instance. But there= were no obvious
statements on why it should be in this manner. So, for = me, it's much
clearer to increment and handle wraparound in o= ne place rather
than spread it across multiple calls in the modul= e.

--
Best regards,
<= /div>
Maxim Orlov.
--0000000000005dc2ba0645ac8e6d--