forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit4e47b02
committed
Reorder superuser check in pg_log_backend_memory_contexts()
The use of this function is limited to superusers and the code includesa hardcoded check for that. However, the code would look for the PGPROCentry to signal for the memory dump before checking if the user is asuperuser or not, which does not make sense if we know that an errorwill be returned. Note that the code would let one know if a processwas a PostgreSQL process or not even for non-authorized users, which isnot the case now, but this avoids taking ProcArrayLock that will mostlikely finish by being unnecessary.Thanks to Julien Rouhaud and Tom Lane for the discussion.Discussion:https://postgr.es/m/YLxw1uVGIAP5uMPl@paquier.xyz1 parent3bb309b commit4e47b02
1 file changed
+9
-7
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
175 | 175 |
| |
176 | 176 |
| |
177 | 177 |
| |
178 |
| - | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
179 | 187 |
| |
180 | 188 |
| |
181 | 189 |
| |
| |||
197 | 205 |
| |
198 | 206 |
| |
199 | 207 |
| |
200 |
| - | |
201 |
| - | |
202 |
| - | |
203 |
| - | |
204 |
| - | |
205 |
| - | |
206 | 208 |
| |
207 | 209 |
| |
208 | 210 |
| |
|
0 commit comments
Comments
(0)