Re: Enhancing Memory Context Statistics Reporting

Daniel Gustafsson <daniel@yesql.se>

From: Daniel Gustafsson <daniel@yesql.se>
To: Rahila Syed <rahilasyed90@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>, torikoshia <torikoshia@oss.nttdata.com>, Robert Haas <robertmhaas@gmail.com>, Chao Li <li.evan.chao@gmail.com>
Date: 2026-03-12T13:44:28Z
Lists: pgsql-hackers

Attachments

> On 5 Mar 2026, at 23:31, Rahila Syed <rahilasyed90@gmail.com> wrote:

> The email below provides a summary of the changes implemented since the previous 
> update on December 18th.

Thanks for the summary!

> Please find attached updated and rebased patches.

The rebase needed another rebase which I've attached as v55.  I've also fixed
up some issues with the meson buildfiles for the tests as well polished a bit
here and there.  I've also squashed 0001 and 0002 as well as reworded the
commit message.

I will continue to test this patch with different process types etc, but unless
I find something which has escaped detection thus far I intend to go ahead with
this patch before the freeze.

--
Daniel Gustafsson

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Cross-check lists of built-in LWLock tranches.

  2. Convert strncpy to strlcpy

  3. Typo and doc fixups for memory context reporting

  4. Add missing string terminator

  5. Rename argument in pg_get_process_memory_contexts().

  6. Add function to get memory context stats for processes