- Notifications
You must be signed in to change notification settings - Fork28
Commitc34677f
committed
Fix SHOW ALL command for non-superusers with replication connection
Since Postgres 10, SHOW commands can be triggered with replicationconnections in a WAL sender context, however it missed that atransaction context is needed for syscache lookups. This commit makessure that the syscache lookups can happen correctly by setting atransaction context when running SHOW commands in a WAL sender.Superuser-only parameters can be displayed using SHOW commands not onlyto superusers, but also to members of system role pg_read_all_settings,which requires a syscache lookup to check if the connected role is amember of this system role or not, or the instance crashes. Superusersdo not need to check the syscache so it worked correctly in this case.New tests are added to cover this issue.Reported-by: Alexander KukushkinAuthor: Michael PaquierReviewed-by: Álvaro HerreraDiscussion:https://postgr.es/m/15734-2daa8761eeed8e20@postgresql.orgBackpatch-through: 101 parent4ab02e8 commitc34677f
File tree
2 files changed
+57
-2
lines changed- src
- backend/replication
- test/recovery/t
2 files changed
+57
-2
lines changedLines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1552 | 1552 |
| |
1553 | 1553 |
| |
1554 | 1554 |
| |
| 1555 | + | |
| 1556 | + | |
1555 | 1557 |
| |
| 1558 | + | |
1556 | 1559 |
| |
1557 | 1560 |
| |
1558 | 1561 |
| |
|
Lines changed: 54 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3 | 3 |
| |
4 | 4 |
| |
5 | 5 |
| |
6 |
| - | |
| 6 | + | |
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
10 |
| - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
11 | 14 |
| |
12 | 15 |
| |
13 | 16 |
| |
| |||
117 | 120 |
| |
118 | 121 |
| |
119 | 122 |
| |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
120 | 172 |
| |
121 | 173 |
| |
122 | 174 |
| |
|
0 commit comments
Comments
(0)