Remove code duplication for permission checks with replication slots
Michael Paquier <michael@paquier.xyz>
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
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/replication/logical/logicalfuncs.c | modified | +1 −10 |
| src/backend/replication/slot.c | modified | +12 −0 |
| src/backend/replication/slotfuncs.c | modified | +5 −14 |
| src/include/replication/slot.h | modified | +1 −0 |
Discussion
- Remove duplicate static function check_permissions in slotfuncs.c and logicalfuncs.c 10 messages · 2021-09-11 → 2021-09-14