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: Michael Paquier <michael@paquier.xyz>
Cc: torikoshia <torikoshia@oss.nttdata.com>, Kasahara Tatsuhito <kasahara.tatsuhito@gmail.com>, Andres Freund <andres@anarazel.de>, Tom Lane <tgl@sss.pgh.pa.us>, PostgreSQL-development <pgsql-hackers@postgresql.org>, Robert Haas <robertmhaas@gmail.com>
Date: 2020-08-25T02:12:03Z
Lists: pgsql-hackers

On 2020/08/24 17:09, Michael Paquier wrote:
> On Mon, Aug 24, 2020 at 02:48:50PM +0900, Fujii Masao wrote:
>> As far as I know, utils/adt is the directory to basically include the files
>> for a particular type or operator. So ISTM that mcxtfuncs.c doesn't
>> fit to this directory. Isn't it better to put that in utils/mmgr ?
> 
> We have also stuff like ruleutils.c, dbsize.c, genfile.c there which
> is rather generic, so I would rather leave utils/mmgr/ out of the
> business of this thread, and just keep inside all the lower-level APIs
> for memory context handling.

Understood. So I will commit the latest patch 0001-Rellocated-the-codes-for-pg_backend_memory_contexts-.patch.

Regards,

-- 
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION



Commits

  1. Add regression test for pg_backend_memory_contexts.

  2. Move codes for pg_backend_memory_contexts from mmgr/mcxt.c to adt/mcxtfuncs.c.

  3. Prevent non-superusers from reading pg_backend_memory_contexts, by default.

  4. Add pg_backend_memory_contexts system view.

  5. Fix yet another issue with step generation in partition pruning.