Re: Creating a function for exposing memory usage of backend process
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Fujii Masao <masao.fujii@oss.nttdata.com>
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-24T08:09:59Z
Lists: pgsql-hackers
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. I don't have a strong feeling for one being better than the other, so if you prefer more one way than the other, that's fine by me as long as the split is done as the new functions depend on nothing static in mcxt.c. And you are the committer of this feature. > The copyright line in new file mcxtfuncs.c should be changed as follows > because it contains new code? > - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group > - * Portions Copyright (c) 1994, Regents of the University of California > + * Portions Copyright (c) 2020, PostgreSQL Global Development Group FWIW, I usually choose what's proposed in the patch as a matter of consistency, because it is a no-brainer and because you don't have to think about past references when it comes to structures or such. -- Michael
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