forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitae90ffa
committed
Have pg_terminate/cancel_backend not ERROR on non-existent processes
This worked fine for superusers, but not for ordinary users trying tocancel their own processes. Tweak the order the checks are done in sothat we correctly return SIGNAL_BACKEND_ERROR (which current callersknow to ignore without erroring out) so that an ordinary user can loopthrough a resultset without fearing that a process might exit in themiddle of said looping -- causing the remaining processes to gounsignalled.Incidentally, the last in-core caller of IsBackendPid() is now gone.However, the function is exported and must remain in place, becausethere are plenty of callers in external modules.Author: Josh KupershmidtReviewed by Noah Misch1 parent55c1687 commitae90ffa
1 file changed
+16
-23
lines changedLines changed: 16 additions & 23 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
73 | 73 |
| |
74 | 74 |
| |
75 | 75 |
| |
| 76 | + | |
76 | 77 |
| |
77 | 78 |
| |
78 | 79 |
| |
79 | 80 |
| |
80 | 81 |
| |
81 |
| - | |
| 82 | + | |
82 | 83 |
| |
83 | 84 |
| |
84 | 85 |
| |
| |||
88 | 89 |
| |
89 | 90 |
| |
90 | 91 |
| |
91 |
| - | |
92 |
| - | |
93 |
| - | |
94 |
| - | |
95 |
| - | |
96 |
| - | |
97 |
| - | |
98 |
| - | |
99 |
| - | |
100 |
| - | |
101 |
| - | |
102 |
| - | |
103 |
| - | |
104 |
| - | |
105 |
| - | |
106 |
| - | |
| 92 | + | |
107 | 93 |
| |
108 |
| - | |
109 |
| - | |
110 |
| - | |
111 |
| - | |
112 |
| - | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
113 | 103 |
| |
114 | 104 |
| |
115 | 105 |
| |
116 |
| - | |
| 106 | + | |
117 | 107 |
| |
118 | 108 |
| |
119 | 109 |
| |
120 | 110 |
| |
121 | 111 |
| |
122 | 112 |
| |
| 113 | + | |
| 114 | + | |
| 115 | + | |
123 | 116 |
| |
124 | 117 |
| |
125 | 118 |
| |
|
0 commit comments
Comments
(0)