Re: pg_upgrade silently truncates nextMultiOffset to 32 bits - Mailing list pgsql-hackers

From Masahiko Sawada
Subject Re: pg_upgrade silently truncates nextMultiOffset to 32 bits
Date
Msg-id CAD21AoD3DVB3ffP-9CU3WMDwBHRy64AshE5ARm=OLHp0+pW0TA@mail.gmail.com
Whole thread
In response to Re: pg_upgrade silently truncates nextMultiOffset to 32 bits  (Chao Li <li.evan.chao@gmail.com>)
Responses Re: Support EXCEPT for TABLES IN SCHEMA publications
List pgsql-hackers
On Thu, Aug 27, 2026 at 10:56 AM Heikki Linnakangas <hlinnaka@iki.fi> wrote:
>
> 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!

Pushed.

Regards,

--
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com



pgsql-hackers by date:

Previous
From: Mihail Nikalayeu
Date:
Subject: Logical replication can lose an update after concurrent index invalidation
Next
From: Chao Li
Date:
Subject: Re: tablecmds: fix bug where index rebuild loses replica identity on partitions