Refactoring of pg_resetwal/t/001_basic.pl

From: Maxim Orlov <orlovmg(at)gmail(dot)com>
To: Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Refactoring of pg_resetwal/t/001_basic.pl
Date: 2024-03-21 16:58:28
Message-ID: CACG=ezaGk5q1Rmdmy24fzzgqmVipJOp-ha2XDxCrr3w5ftPOKA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi!

In commit 7b5275eec more tests and test coverage were added into
pg_resetwal/t/001_basic.pl.
All the added stuff are pretty useful in my view. Unfortunately, there
were some magic constants
been used. In overall, this is not a problem. But while working on 64 bit
XIDs I've noticed these
changes and spent some time to figure it out what this magic values are
stands fore.

And it turns out that I’m not the only one.

So, by Svetlana Derevyanko's suggestion, I made this patch. I add
constants, just like we did
in verify_heapam tests.

Sidenote here: in defines in multixact.c TransactionId type used, but I'm
sure this is not correct,
since we're dealing here with MultiXactId and MultiXactOffset. For now,
this is obviously not a
problem, since sizes of this particular types are equal. But this will
manifest itself when we switch
to the 64 bits types for MultiXactOffset or MultiXactId.

As always, reviews and opinions are very welcome!

--
Best regards,
Maxim Orlov.

Attachment Content-Type Size
v1-0001-Refactor-pg_resetwal-t-001_basic.pl.patch application/octet-stream 1.9 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2024-03-21 17:00:39 Re: Slow GRANT ROLE on PostgreSQL 16 with thousands of ROLEs
Previous Message Andres Freund 2024-03-21 16:51:37 Re: Trying to build x86 version on windows using meson