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

From Michael Paquier
Subject Re: Refactoring of pg_resetwal/t/001_basic.pl
Date
Msg-id Zg4JWLBHD4xfPGJG@paquier.xyz
Whole thread Raw
In response to Re: Refactoring of pg_resetwal/t/001_basic.pl  (Svetlana Derevyanko <s.derevyanko@postgrespro.ru>)
List pgsql-hackers
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 approach and retrieve such values
directly from the headers.  See scan_server_header() in
039_end_of_wal.pl as one example.  7b5275eec3a5 is newer than
bae868caf222, so the original commit could have used that, as well.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: Parent/child context relation in pg_get_backend_memory_contexts()
Next
From: David Rowley
Date:
Subject: Re: PostgreSQL 17 Release Management Team & Feature Freeze