Add arbitrary xid and mxid to pg_resetwal

From: Daniil Davydov <3danissimo(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Add arbitrary xid and mxid to pg_resetwal
Date: 2025-03-06 03:59:27
Message-ID: CAJDiXgjWXn7e21j0VkZHACZ7r6qx=Hhy0hzZ4S3NRnDEsWVxBQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,
I prepared a patch that will allow us to set arbitrary values in -m and -x
options for pg_resetwal. For now, it is not possible to specify a value
that does not fit into existing SLRU segments, and
main idea of this patch (for REL_17_STABLE) is to create such segments
inside pg_resetwal's main() function.
In my opinion, this will be useful primarily to simplify testing, since at
the moment you have to create segments manually (as in this article
<https://www.cybertec-postgresql.com/en/transaction-id-wraparound-a-walk-on-the-wild-side/>
).

Patch also contains additional tests for pg_resetwal (regression is called
to make sure that all postgres components are working correctly, but maybe
it can be replaced with something more "compact").

What do you think about the idea of adding such functionality?

--
Best regards,
Daniil Davydov

Attachment Content-Type Size
0001-Allow-to-set-any-value-for-m-and-x-options.patch text/x-patch 9.8 KB

Browse pgsql-hackers by date

  From Date Subject
Next Message Corey Huinker 2025-03-06 04:04:29 Re: Statistics Import and Export
Previous Message Peter Smith 2025-03-06 03:56:33 Re: Adding a '--clean-publisher-objects' option to 'pg_createsubscriber' utility.