Re: Align memory context level numbering in pg_log_backend_memory_contexts()

Rahila Syed <rahilasyed90@gmail.com>

From: Rahila Syed <rahilasyed90@gmail.com>
To: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2025-04-17T12:25:04Z
Lists: pgsql-hackers
 Hi,


> The attached patch is how I think we should do it.
>

Thank you for the patch.
I tested this patch and it works fine. I agree with the changes made in it.

Regarding v2 patch,
-                       int                     level = 0;

Retaining the level variable will enhance the code readability, IMO.

Thank you,
Rahila Syed

Commits

  1. doc: Fix memory context level in pg_log_backend_memory_contexts() example.

  2. Make levels 1-based in pg_log_backend_memory_contexts()

  3. Add path column to pg_backend_memory_contexts view