Commit 2bbc261
committed
Use an shmem_exit callback to remove backend from PMChildFlags on exit
This seems nicer than having to duplicate the logic between
InitProcess() and ProcKill() for which child processes have a
PMChildFlags slot.
Move the MarkPostmasterChildActive() call earlier in InitProcess(),
out of the section protected by the spinlock.
Reviewed-by: Andres Freund <andres@anarazel.de>
Discussion: https://www.postgresql.org/message-id/a102f15f-eac4-4ff2-af02-f9ff209ec66f@iki.fi1 parent 85ec945 commit 2bbc261
File tree
3 files changed
+27
-31
lines changed- src
- backend/storage
- ipc
- lmgr
- include/storage
3 files changed
+27
-31
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
121 | 122 | | |
122 | 123 | | |
123 | 124 | | |
| 125 | + | |
| 126 | + | |
124 | 127 | | |
125 | 128 | | |
126 | 129 | | |
| |||
316 | 319 | | |
317 | 320 | | |
318 | 321 | | |
319 | | - | |
| 322 | + | |
320 | 323 | | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
321 | 327 | | |
322 | 328 | | |
323 | | - | |
| 329 | + | |
324 | 330 | | |
325 | 331 | | |
326 | 332 | | |
327 | 333 | | |
328 | 334 | | |
329 | 335 | | |
330 | 336 | | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
331 | 340 | | |
332 | 341 | | |
333 | 342 | | |
| |||
352 | 361 | | |
353 | 362 | | |
354 | 363 | | |
355 | | - | |
356 | | - | |
| 364 | + | |
| 365 | + | |
357 | 366 | | |
358 | 367 | | |
359 | 368 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
354 | 354 | | |
355 | 355 | | |
356 | 356 | | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
357 | 370 | | |
358 | 371 | | |
359 | 372 | | |
| |||
406 | 419 | | |
407 | 420 | | |
408 | 421 | | |
409 | | - | |
410 | | - | |
411 | | - | |
412 | | - | |
413 | | - | |
414 | | - | |
415 | | - | |
416 | | - | |
417 | | - | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | | - | |
422 | 422 | | |
423 | 423 | | |
424 | 424 | | |
| |||
993 | 993 | | |
994 | 994 | | |
995 | 995 | | |
996 | | - | |
997 | | - | |
998 | | - | |
999 | | - | |
1000 | | - | |
1001 | | - | |
1002 | | - | |
1003 | | - | |
1004 | | - | |
1005 | | - | |
1006 | | - | |
1007 | | - | |
1008 | 996 | | |
1009 | 997 | | |
1010 | 998 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
77 | | - | |
| 76 | + | |
78 | 77 | | |
79 | 78 | | |
80 | 79 | | |
| |||
0 commit comments