From: Heikki Linnakangas <hlinnaka@iki.fi>
To: Masahiko Sawada <sawada.mshk@gmail.com>
Cc: Chao Li <li.evan.chao@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: pg_upgrade silently truncates nextMultiOffset to 32 bits
Date: Thu, 27 Aug 2026 20:56:29 +0300
Message-ID: <35dd1ac3-3cef-4d8f-ade1-b588f7fa89a0@iki.fi> (raw)
In-Reply-To: <CAD21AoAwaNbtxj73p4HhS_KHzouazWd9TvwTTMvnB4DGcptw3g@mail.gmail.com>
References: <CAD21AoCvzerscfU8o4ARQ793yAGHpQ72r2x5apeC_W2-k=SLCQ@mail.gmail.com>
<D0710380-D4E2-431F-B761-B4FE58AE7266@gmail.com>
<CAD21AoDvDKgNqPFm86LBL6-pP0awnV5OrbhRRC2e7ryDmO-nPw@mail.gmail.com>
<d7308775-1f9a-4f3c-98e0-91a44d778e90@iki.fi>
<d072898d-6d9b-4b97-82b2-683b91ffe197@iki.fi>
<CAD21AoAwaNbtxj73p4HhS_KHzouazWd9TvwTTMvnB4DGcptw3g@mail.gmail.com>
On 27/08/2026 20:25, Masahiko Sawada wrote:
> On Thu, Aug 27, 2026 at 1:58 AM Heikki Linnakangas <hlinnaka@iki.fi> wrote:
>>
>> On 27/08/2026 11:20, Heikki Linnakangas wrote:
>>> On 27/08/2026 10:35, Masahiko Sawada wrote:
>>>> I considered using xid8 instead but it has only comparison operators
>>>> and no arithmetic, so we couldn't compute a delta between two
>>>> checkpoints.
>>>
>>> Hmm, that's a good point, although 'xid' didn't have those operators or
>>> arithmetic either.
>>
>> That was inaccurate: both 'xid' and 'xid8' do have comparison operators.
>> But they don't have a "minus" or "diff" operator, so you indeed cannot
>> easily do "b - a".
>>
>> I don't have a strong opinion, I'm happy with either bigint or xid8
>> here. Bigint is probably more convenient in practice, and it's good to
>> not confuse mxact offsets with transaction ids by abusing the xid8 type.
>> Then again, it was 'xid' before, which had the same issues and we went
>> with 'xid' anyway. Then again, now that it doesn't wrap around anymore,
>> maybe 'bigint' makes more sense now.
>
> I missed the point that we used to use 'xid' for that field. But I
> agree that 'bigint' makes more sense.
>
>> Would you like to decide and commit this, or would you prefer me to do it?
>
> I'm going to take them and go with the 'bigint' column if you're okay.
>
> I've added the commit messages to the patches.
Ok, thank you!
- Heikki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: hlinnaka@iki.fi, sawada.mshk@gmail.com, li.evan.chao@gmail.com
Subject: Re: pg_upgrade silently truncates nextMultiOffset to 32 bits
In-Reply-To: <35dd1ac3-3cef-4d8f-ade1-b588f7fa89a0@iki.fi>
References: <CAD21AoCvzerscfU8o4ARQ793yAGHpQ72r2x5apeC_W2-k=SLCQ@mail.gmail.com> <D0710380-D4E2-431F-B761-B4FE58AE7266@gmail.com> <CAD21AoDvDKgNqPFm86LBL6-pP0awnV5OrbhRRC2e7ryDmO-nPw@mail.gmail.com> <d7308775-1f9a-4f3c-98e0-91a44d778e90@iki.fi> <d072898d-6d9b-4b97-82b2-683b91ffe197@iki.fi> <CAD21AoAwaNbtxj73p4HhS_KHzouazWd9TvwTTMvnB4DGcptw3g@mail.gmail.com> <35dd1ac3-3cef-4d8f-ade1-b588f7fa89a0@iki.fi>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox