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