Re: Allow pg_signal_backend members to use pg_log_backend_memory_stats().

From: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
To: Jeff Davis <pgsql(at)j-davis(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, bossartn(at)amazon(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Allow pg_signal_backend members to use pg_log_backend_memory_stats().
Date: 2021-10-26 14:32:00
Message-ID: 3c7e03db-b55a-52b7-3512-be9a35d660aa@oss.nttdata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2021/10/26 5:42, Jeff Davis wrote:
> On Mon, 2021-10-25 at 16:10 +0900, Michael Paquier wrote:
>> Hmm. Why don't you split the patch into two parts that can be
>> discussed separately then? There would be one to remove all the
>> superuser() checks you can think of, and a potential second to grant
>> those function's execution to some system role.
>
> Good idea. Attached a patch to remove the superuser check on
> pg_log_backend_memory_contexts(), except in the case when trying to log
> memory contexts of a superuser backend.

- Only superusers can request to log the memory contexts.
+ Only superusers can request to log the memory contexts of superuser
+ backends.

The description "This function is restricted to superusers by default,
but other users can be granted EXECUTE to run the function."
should be added into the docs?

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 Arjan van de Ven 2021-10-26 14:57:36 src/port/snprintf.c: Optimize the common base=10 case in fmtint
Previous Message Bruce Momjian 2021-10-26 14:25:32 Re: Suggestion: Unified options API. Need help from core team