pgsql: Replace superuser check by ACLs for replication origin functions

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Replace superuser check by ACLs for replication origin functions
Date: 2020-06-14 03:43:38
Message-ID: E1jkJYY-00064W-KX@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2020-06-14 06:11:56 pgsql: Add test coverage for EXTRACT()
Previous Message Tom Lane 2020-06-13 18:01:53 pgsql: Sync behavior of var_samp and stddev_samp for single NaN inputs.