Re: Align memory context level numbering in pg_log_backend_memory_contexts() - Mailing list pgsql-hackers

From David Rowley
Subject Re: Align memory context level numbering in pg_log_backend_memory_contexts()
Date
Msg-id CAApHDvp49iH3smyoYTWynV7R4z1e=O9C16z7kW1Zs9uAQ7vGPw@mail.gmail.com
Whole thread Raw
In response to Re: Align memory context level numbering in pg_log_backend_memory_contexts()  (Rahila Syed <rahilasyed90@gmail.com>)
Responses Re: Align memory context level numbering in pg_log_backend_memory_contexts()
List pgsql-hackers
On Fri, 18 Apr 2025 at 00:25, Rahila Syed <rahilasyed90@gmail.com> wrote:
> Regarding v2 patch,
> -                       int                     level = 0;
>
> Retaining the level variable will enhance the code readability, IMO.

When I read that, I suspected it might have been leftover from a
refactor during the development that was forgotten about. There'd be
thousands of places in our code base that you could make the
readability argument for, including the max_level and max_children
parameters at the same call-site. But those didn't get the same
treatment.

I've now pushed the latest patch. Thanks for the reviews.

David



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: SQL functions: avoid making a tuplestore unnecessarily
Next
From: Dmitry Dolgov
Date:
Subject: Re: Changing shared_buffers without restart