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_4npzksxxk6cw1d...@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(-)
