Re: Allow pg_signal_backend members to use pg_log_backend_memory_stats().

Andres Freund <andres@anarazel.de>

From: Andres Freund <andres@anarazel.de>
To: Jeff Davis <pgsql@j-davis.com>
Cc: Michael Paquier <michael@paquier.xyz>, Kyotaro Horiguchi <horikyota.ntt@gmail.com>, bossartn@amazon.com, pgsql-hackers@postgresql.org
Date: 2021-10-25T21:30:38Z
Lists: pgsql-hackers
Hi,

On 2021-10-25 13:42:07 -0700, Jeff Davis wrote:
> 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.

I don't get the reasoning behind the "except ..." logic. What does this
actually protect against? A reasonable use case for this feature is is to
monitor memory usage of all backends, and this restriction practially requires
to still use a security definer function.

Greetings,

Andres Freund



Commits

  1. Allow GRANT on pg_log_backend_memory_contexts().