- Notifications
You must be signed in to change notification settings - Fork28
Commitfd71421
committed
Improve tests for postmaster death in auxiliary processes.
In checkpointer and walwriter, avoid calling PostmasterIsAlive unlessWaitLatch has reported WL_POSTMASTER_DEATH. This saves a kernel call periteration of the process's outer loop, which is not all that much, but acycle shaved is a cycle earned. I had already removed the unconditionalPostmasterIsAlive calls in bgwriter and pgstat in previous patches, butforgot that WL_POSTMASTER_DEATH is supposed to be treated as untrustworthy(per comment in unix_latch.c); so adjust those two cases to match.There are a few other places where the same idea might be applied, but onlyafter substantial code rearrangement, so I didn't bother.1 parente78cc62 commitfd71421
File tree
4 files changed
+37
-24
lines changed- src/backend/postmaster
4 files changed
+37
-24
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
323 | 323 | | |
324 | 324 | | |
325 | 325 | | |
326 | | - | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
327 | 329 | | |
328 | | - | |
| 330 | + | |
329 | 331 | | |
330 | 332 | | |
331 | 333 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
374 | 374 | | |
375 | 375 | | |
376 | 376 | | |
| 377 | + | |
377 | 378 | | |
378 | 379 | | |
379 | 380 | | |
380 | 381 | | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | | - | |
388 | 382 | | |
389 | 383 | | |
390 | 384 | | |
| |||
581 | 575 | | |
582 | 576 | | |
583 | 577 | | |
584 | | - | |
585 | | - | |
586 | | - | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
587 | 590 | | |
588 | 591 | | |
589 | 592 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3225 | 3225 | | |
3226 | 3226 | | |
3227 | 3227 | | |
3228 | | - | |
3229 | | - | |
| 3228 | + | |
| 3229 | + | |
| 3230 | + | |
| 3231 | + | |
| 3232 | + | |
| 3233 | + | |
| 3234 | + | |
3230 | 3235 | | |
3231 | 3236 | | |
3232 | 3237 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
| 249 | + | |
249 | 250 | | |
250 | 251 | | |
251 | 252 | | |
| |||
265 | 266 | | |
266 | 267 | | |
267 | 268 | | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | 269 | | |
276 | 270 | | |
277 | 271 | | |
| |||
305 | 299 | | |
306 | 300 | | |
307 | 301 | | |
308 | | - | |
309 | | - | |
310 | | - | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
311 | 314 | | |
312 | 315 | | |
313 | 316 | | |
| |||
0 commit comments
Comments
(0)