Thread: pgsql: Replace superuser check by ACLs for replication origin functions

pgsql: Replace superuser check by ACLs for replication origin functions

From
Michael Paquier
Date:
Replace superuser check by ACLs for replication origin functions

This patch removes the hardcoded check for superuser privileges when
executing replication origin functions.  Instead, execution is revoked
from public, meaning that those functions can be executed by a superuser
and that access to them can be granted.

Author: Martín Marqués
Reviewed-by: Kyotaro Horiguchi, Michael Paquier, Masahiko Sawada
Discussion: https:/postgr.es/m/CAPdiE1xJMZOKQL3dgHMUrPqysZkgwzSMXETfKkHYnBAB7-0VRQ@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/cc072641d41c55c6aa24a331fc1f8029e0a8d799

Modified Files
--------------
contrib/test_decoding/expected/replorigin.out | 29 +++++++++++++++++++++++++++
contrib/test_decoding/sql/replorigin.sql      | 18 +++++++++++++++++
doc/src/sgml/func.sgml                        |  4 +++-
src/backend/catalog/system_views.sql          | 13 ++++++++++++
src/backend/replication/logical/origin.c      |  5 -----
5 files changed, 63 insertions(+), 6 deletions(-)