Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mfNUq-0005kS-Jf for pgsql-hackers@arkaria.postgresql.org; Tue, 26 Oct 2021 14:32:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mfNUp-0008HF-J7 for pgsql-hackers@arkaria.postgresql.org; Tue, 26 Oct 2021 14:32:11 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mfNUp-0008H6-Ax for pgsql-hackers@lists.postgresql.org; Tue, 26 Oct 2021 14:32:11 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mfNUm-0007jw-0o for pgsql-hackers@postgresql.org; Tue, 26 Oct 2021 14:32:10 +0000 Received: from hrk.local (p2388012-ipbf1027funabasi.chiba.ocn.ne.jp [118.6.6.12]) by oss.nttdata.com (Postfix) with ESMTPSA id 53FAC60797; Tue, 26 Oct 2021 23:32:01 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.3 at oss.nttdata.com Subject: Re: Allow pg_signal_backend members to use pg_log_backend_memory_stats(). To: Jeff Davis , Michael Paquier Cc: Kyotaro Horiguchi , bossartn@amazon.com, pgsql-hackers@postgresql.org References: <33F34F0C-BB16-48DE-B125-95D340A54AE8@amazon.com> <20211025.115333.563958443822411952.horikyota.ntt@gmail.com> <66fbd8a7b7b0037c9e1df48b41941aa587c67f4d.camel@j-davis.com> From: Fujii Masao Message-ID: <3c7e03db-b55a-52b7-3512-be9a35d660aa@oss.nttdata.com> Date: Tue, 26 Oct 2021 23:32:00 +0900 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <66fbd8a7b7b0037c9e1df48b41941aa587c67f4d.camel@j-davis.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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