Re: Read access for pg_monitor to pg_replication_origin_status view - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Read access for pg_monitor to pg_replication_origin_status view
Date
Msg-id 20200531020220.GL44192@paquier.xyz
Whole thread Raw
In response to Re: Read access for pg_monitor to pg_replication_origin_status view  (Martín Marqués <martin@2ndquadrant.com>)
Responses Re: Read access for pg_monitor to pg_replication_origin_status view
List pgsql-hackers
On Fri, May 29, 2020 at 05:39:31PM -0300, Martín Marqués wrote:
> I believe we could skip the superuser() check for cases like
> pg_replication_origin_session_progress() and
> pg_replication_origin_progress().
>
> Once option could be to add a third bool argument check_superuser to
> replorigin_check_prerequisites() and have it set to false for the
> functions which a none superuser could execute.

Wouldn't it be just better to remove this hardcoded superuser check
and replace it with equivalent ACLs by default?  The trick is to make
sure that any function calling replorigin_check_prerequisites() has
its execution correctly revoked from public.  See for example
e79350fe.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: OpenSSL 3.0.0 compatibility
Next
From: Michael Paquier
Date:
Subject: Re: Inlining of couple of functions in pl_exec.c improves performance