Re: Refactoring of pg_resetwal/t/001_basic.pl - Mailing list pgsql-hackers

From Svetlana Derevyanko
Subject Re: Refactoring of pg_resetwal/t/001_basic.pl
Date
Msg-id cdba31421408ccb41756a04798c4fd54@postgrespro.ru
Whole thread Raw
In response to Re: Refactoring of pg_resetwal/t/001_basic.pl  (Peter Eisentraut <peter@eisentraut.org>)
Responses Re: Refactoring of pg_resetwal/t/001_basic.pl
Re: Refactoring of pg_resetwal/t/001_basic.pl
List pgsql-hackers
Peter Eisentraut писал(а) 2024-03-25 17:10:

> But MXOFF_SIZE doesn't exist anywhere else.  The actual formula uses
> sizeof(MultiXactOffset), which isn't obvious from your patch.  So this 
> just moves the magic constants around by one level.
> 
> I think if we're going to add more symbols, then it has to be done 
> consistently in the source code, the documentation, and the tests, not 
> just one of them.
> 

Hello!
Thank you for your reply.

Attached is the updated version of patch for pg_resetwal test. I added 
definitions for MXOFF_SIZE and MXID_SIZE constants in multixact.c (and 
replaced use of sizeof(MultiXactId) and sizeof(MultiXactOffset) 
accordingly). Also changed multipliers for pg_xact/members/offset on 
CLOG_XACTS_PER_PAGE/MULTIXACT_MEMBERS_PER_PAGE/MULTIXACT_OFFSETS_PER_PAGE 
both in src/bin/pg_resetwal/t/001_basic.pl and docs, since it seems to 
me that this makes things more clear.

What do you think?


Best regards,
Svetlana Derevyanko.

Attachment

pgsql-hackers by date:

Previous
From: Nazir Bilal Yavuz
Date:
Subject: Re: Use streaming read API in ANALYZE
Next
From: Tender Wang
Date:
Subject: Can't find not null constraint, but \d+ shows that