Re: Enhancing Memory Context Statistics Reporting

Rahila Syed <rahilasyed90@gmail.com>

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

Attachments

Hi,

Please find attached updated and rebased patches which incorporate
code fixes suggested off-list by Daniel

These changes include a fix to free dsa memory in one of the
exit paths from the client-side function along with several documentation
and comment improvements.


> I think we can calculate remaining time and pass remaining milliseconds
> into ConditionVariableTimedSleep.
>
>
This comment by Chao Li was also addressed as part of Daniel's review
fixes.

Thank you,
Rahila Syed

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