Re: Creating a function for exposing memory usage of backend process

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
Cc: torikoshia <torikoshia(at)oss(dot)nttdata(dot)com>, Kasahara Tatsuhito <kasahara(dot)tatsuhito(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: Re: Creating a function for exposing memory usage of backend process
Date: 2020-08-24 08:09:59
Message-ID: 20200824080959.GC25747@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2020-08-24 09:19:28 Re: [POC] Fast COPY FROM command for the table with foreign partitions
Previous Message Michael Paquier 2020-08-24 07:58:34 Re: Documentation patch for backup manifests in protocol.sgml