Commit 026ed8e
committed
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.com1 parent 138531f commit 026ed8e
File tree
4 files changed
+19
-24
lines changed- src
- backend/replication
- logical
- include/replication
4 files changed
+19
-24
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | 98 | | |
108 | 99 | | |
109 | 100 | | |
| |||
124 | 115 | | |
125 | 116 | | |
126 | 117 | | |
127 | | - | |
| 118 | + | |
128 | 119 | | |
129 | 120 | | |
130 | 121 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1059 | 1059 | | |
1060 | 1060 | | |
1061 | 1061 | | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
1062 | 1074 | | |
1063 | 1075 | | |
1064 | 1076 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | 28 | | |
38 | 29 | | |
39 | 30 | | |
| |||
85 | 76 | | |
86 | 77 | | |
87 | 78 | | |
88 | | - | |
| 79 | + | |
89 | 80 | | |
90 | 81 | | |
91 | 82 | | |
| |||
188 | 179 | | |
189 | 180 | | |
190 | 181 | | |
191 | | - | |
| 182 | + | |
192 | 183 | | |
193 | 184 | | |
194 | 185 | | |
| |||
224 | 215 | | |
225 | 216 | | |
226 | 217 | | |
227 | | - | |
| 218 | + | |
228 | 219 | | |
229 | 220 | | |
230 | 221 | | |
| |||
619 | 610 | | |
620 | 611 | | |
621 | 612 | | |
622 | | - | |
| 613 | + | |
623 | 614 | | |
624 | 615 | | |
625 | 616 | | |
| |||
718 | 709 | | |
719 | 710 | | |
720 | 711 | | |
721 | | - | |
| 712 | + | |
722 | 713 | | |
723 | 714 | | |
724 | 715 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
| 225 | + | |
225 | 226 | | |
226 | 227 | | |
0 commit comments