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>
Date: 2025-04-05T19:29:21Z
Lists: pgsql-hackers

Attachments

> On 2 Apr 2025, at 23:44, Daniel Gustafsson <daniel@yesql.se> wrote:

> I think this version is close to a committable state, will spend a little more
> time testing, polishing and rewriting the commit message.  I will also play
> around with placement within the memory context code files to keep it from
> making backpatch issues.

After a bit more polish I landed with the attached, which I most likely will go
ahead with after another round in CI.

--
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