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

From: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
To: torikoshia <torikoshia(at)oss(dot)nttdata(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Creating a function for exposing memory usage of backend process
Date: 2020-06-29 06:13:13
Message-ID: 78268b5f-53ed-4645-1abb-23c1030cce0a@oss.nttdata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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(dot)fujii(at)oss(dot)nttdata(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bharath Rupireddy 2020-06-29 06:40:42 Re: Creating a function for exposing memory usage of backend process
Previous Message Bharath Rupireddy 2020-06-29 06:08:54 Re: [PATCH] COPY command's data format option allows only lowercase csv, text or binary