Re: POC: make mxidoff 64 bits

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: Maxim Orlov <orlovmg(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Alexander Korotkov <aekorotkov(at)gmail(dot)com>, wenhui qiu <qiuwenhuifx(at)gmail(dot)com>, Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>
Subject: Re: POC: make mxidoff 64 bits
Date: 2025-11-26 15:50:25
Message-ID: 2df82550-d2e0-47bc-804e-d7cf363f0db0@iki.fi
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 26/11/2025 17:23, Maxim Orlov wrote:
> On Tue, 25 Nov 2025 at 13:07, Heikki Linnakangas <hlinnaka(at)iki(dot)fi
> <mailto:hlinnaka(at)iki(dot)fi>> 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.

+1

> 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."

Yep, makes sense.

- Heikki

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2025-11-26 15:50:58 Re: Remove unused struct fields
Previous Message Laurenz Albe 2025-11-26 15:39:50 Re: System views for versions reporting