From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Remove code duplication for permission checks with replication s
Date: Tue, 14 Sep 2021 01:16:15 +0000
Message-ID: <E1mPx3X-0007ar-Dy@gemulon.postgresql.org> (raw)
Remove code duplication for permission checks with replication slots
Two functions, both named check_permissions(), used the same checks to
verify if a user had required privileges to work on replication slots.
This commit removes the duplication, and moves the function doing the
checks to slot.c to be centralized.
Author: Bharath Rupireddy
Reviewed-by: Nathan Bossart, Euler Taveira
Discussion: https://postgr.es/m/CALj2ACUPpVw1u7sQocFVWrSs0n10pt_G_4NPZKSxXK6cW1dErw@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/026ed8efd6b1d774924937baf3209b676df4531f
Modified Files
--------------
src/backend/replication/logical/logicalfuncs.c | 11 +----------
src/backend/replication/slot.c | 12 ++++++++++++
src/backend/replication/slotfuncs.c | 19 +++++--------------
src/include/replication/slot.h | 1 +
4 files changed, 19 insertions(+), 24 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: michael@paquier.xyz
Subject: Re: pgsql: Remove code duplication for permission checks with replication s
In-Reply-To: <E1mPx3X-0007ar-Dy@gemulon.postgresql.org>
References: <E1mPx3X-0007ar-Dy@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox