Re: Align memory context level numbering in pg_log_backend_memory_contexts()

Melih Mutlu <m.melihmutlu@gmail.com>

From: Melih Mutlu <m.melihmutlu@gmail.com>
To: torikoshia <torikoshia@oss.nttdata.com>
Cc: David Rowley <dgrowleyml@gmail.com>, Daniel Gustafsson <daniel@yesql.se>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2025-04-17T11:05:42Z
Lists: pgsql-hackers
Hi,

torikoshia <torikoshia@oss.nttdata.com>, 17 Nis 2025 Per, 12:35 tarihinde
şunu yazdı:

> I guess few people would notice this difference, but I think it's better
> to avoid changing it unless there's a good reason to do so.
> Personally, I also feel the original formatting better -- especially
> because the "xx more child contexts..." line is aligned with the other
> child contexts at the same level.
>
> Attached a v2 patch to restore the original indentation.
> What do you think?
>

Thanks for noticing the issue. I also agree with you all about using
1-based levels consistently in memory context outputs
including pg_log_backend_memory_contexts.

I reviewed and tested the v2 patch and LGTM.

Regards,
-- 
Melih

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