forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork0
Commitc9c37e3
committed
Fix coding rules violations in walreceiver.c
1. Since commitb1a9bad we had pstrdup() inside aspinlock-protected critical section; reported by Andreas Seltenreich.Turn those into strlcpy() to stack-allocated variables instead.Backpatch to 9.6.2. Since commit9ed551e we had a pfree() uselessly inside aspinlock-protected critical section. Tom Lane noticed in code review.Move down. Backpatch to 9.6.3. Since commit6423390 we had GetCurrentTimestamp() (a kernelcall) inside a spinlock-protected critical section. Tom Lane noticed incode review. Move it up. Backpatch to 9.2.4. Since commit1bb2558 we did elog(PANIC) while holding spinlock.Tom Lane noticed in code review. Release spinlock before dying.Backpatch to 9.2.Discussion:https://postgr.es/m/87h8vhtgj2.fsf@ansel.ydns.eu1 parent72d4fd0 commitc9c37e3
1 file changed
+6
-1
lines changedLines changed: 6 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
175 | 175 |
| |
176 | 176 |
| |
177 | 177 |
| |
| 178 | + | |
178 | 179 |
| |
179 | 180 |
| |
180 | 181 |
| |
181 | 182 |
| |
182 | 183 |
| |
183 | 184 |
| |
184 | 185 |
| |
| 186 | + | |
| 187 | + | |
185 | 188 |
| |
186 | 189 |
| |
187 | 190 |
| |
| |||
209 | 212 |
| |
210 | 213 |
| |
211 | 214 |
| |
| 215 | + | |
212 | 216 |
| |
213 | 217 |
| |
214 | 218 |
| |
| |||
220 | 224 |
| |
221 | 225 |
| |
222 | 226 |
| |
223 |
| - | |
| 227 | + | |
| 228 | + | |
224 | 229 |
| |
225 | 230 |
| |
226 | 231 |
| |
|
0 commit comments
Comments
(0)