Re: POC: make mxidoff 64 bits

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: wenhui qiu <qiuwenhuifx(at)gmail(dot)com>, Maxim Orlov <orlovmg(at)gmail(dot)com>
Cc: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Alexander Korotkov <aekorotkov(at)gmail(dot)com>, Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: POC: make mxidoff 64 bits
Date: 2025-11-19 16:20:27
Message-ID: bee20393-b1be-40ff-9619-334762e64713@iki.fi
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

One more small issue: The docs for pg_resetwal contain recipes for how
to determine safe values to use:

> -m mxid,mxid
> --multixact-ids=mxid,mxid
> Manually set the next and oldest multitransaction ID.
>
> A safe value for the next multitransaction ID (first part) can be
> determined by looking for the numerically largest file name in the
> directory pg_multixact/offsets under the data directory, adding one,
> and then multiplying by 65536 (0x10000). Conversely, a safe value
> for the oldest multitransaction ID (second part of -m) can be
> determined by looking for the numerically smallest file name in the
> same directory and multiplying by 65536. The file names are in
> hexadecimal, so the easiest way to do this is to specify the option
> value in hexadecimal and append four zeroes.
>
> -O mxoff
> --multixact-offset=mxoff
>
> Manually set the next multitransaction offset.
>
> A safe value can be determined by looking for the numerically
> largest file name in the directory pg_multixact/members under the
> data directory, adding one, and then multiplying by 52352 (0xCC80).
> The file names are in hexadecimal. There is no simple recipe such as
> the ones for other options of appending zeroes.

I think those recipes need to be adjusted for 64-bit offsets.

- Heikki

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Álvaro Herrera 2025-11-19 16:49:42 Re: Consistently use the XLogRecPtrIsInvalid() macro
Previous Message Robert Haas 2025-11-19 16:14:53 Re: Consistently use the XLogRecPtrIsInvalid() macro