Re: Refactoring of pg_resetwal/t/001_basic.pl

2024-04-04 Thread Peter Eisentraut
On 26.03.24 12:53, Svetlana Derevyanko wrote: 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

Re: Refactoring of pg_resetwal/t/001_basic.pl

2024-04-03 Thread Michael Paquier
On Tue, Mar 26, 2024 at 02:53:35PM +0300, Svetlana Derevyanko wrote: > What do you think? > > +use constant SLRU_PAGES_PER_SEGMENT => 32; Well, I disagree with what you are doing here, adding a hardcoded dependency between the test code and the backend code. I would suggest to use a more dynamic

Re: Refactoring of pg_resetwal/t/001_basic.pl

2024-03-26 Thread Svetlana Derevyanko
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 t

Re: Refactoring of pg_resetwal/t/001_basic.pl

2024-03-25 Thread Peter Eisentraut
On 21.03.24 17:58, Maxim Orlov wrote: 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

Re: Refactoring of pg_resetwal/t/001_basic.pl

2024-03-22 Thread Maxim Orlov
On Fri, 22 Mar 2024 at 01:08, Peter Eisentraut wrote: > Please send a separate patch for this if you want to propose any changes. > > Thank you for your reply. Here is the second one. I've change types and argument names for the macro functions, so that they better reflect the reality. -- Bes

Re: Refactoring of pg_resetwal/t/001_basic.pl

2024-03-21 Thread Peter Eisentraut
On 21.03.24 17:58, Maxim Orlov wrote: 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