Re: Creating a function for exposing memory usage of backend process
Fujii Masao <masao.fujii@oss.nttdata.com>
From: Fujii Masao <masao.fujii@oss.nttdata.com>
To: torikoshia <torikoshia@oss.nttdata.com>
Cc: pgsql-hackers@postgresql.org
Date: 2020-06-29T06:13:13Z
Lists: pgsql-hackers
On 2020/06/29 12:01, torikoshia wrote: > On 2020-06-20 03:11, Robert Haas wrote: >> On Wed, Jun 17, 2020 at 11:56 PM Fujii Masao >> <masao.fujii@oss.nttdata.com> wrote: >>> > As a first step, to deal with (3) I'd like to add >>> > pg_stat_get_backend_memory_context() which target is limited to the >>> > local backend process. >>> >>> +1 >> >> +1 from me, too. > > Attached a patch that adds a function exposing memory usage of local > backend. Thanks for the patch! Could you add this patch to Commitfest 2020-07? > > It's almost same as pg_cheat_funcs's pg_stat_get_memory_context(). This patch provides only the function, but isn't it convenient to provide the view like pg_shmem_allocations? > I've also added MemoryContexts identifier because it seems useful to > distinguish the same kind of memory contexts. Sounds good. But isn't it better to document each column? Otherwise, users cannot undersntad what "ident" column indicates. Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION
Commits
-
Add regression test for pg_backend_memory_contexts.
- adc8fc6167aa 14.0 landed
-
Move codes for pg_backend_memory_contexts from mmgr/mcxt.c to adt/mcxtfuncs.c.
- 50db5964ee33 14.0 landed
-
Prevent non-superusers from reading pg_backend_memory_contexts, by default.
- 29dd6d8bc631 14.0 landed
-
Add pg_backend_memory_contexts system view.
- 3e98c0bafb28 14.0 landed
-
Fix yet another issue with step generation in partition pruning.
- 199cec977950 14.0 cited