forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitb406478
committed
process startup: Always call Init[Auxiliary]Process() before BaseInit().
For EXEC_BACKEND InitProcess()/InitAuxiliaryProcess() needs to have beencalled well before we call BaseInit(), as SubPostmasterMain() needs LWLocks towork. Having the order of initialization differ between platforms makes itunnecessarily hard to understand the system and to add initialization pointsfor new subsystems without a lot of duplication.To be able to change the order, BaseInit() cannot triggerCreateSharedMemoryAndSemaphores() anymore - obviously that needs to havehappened before we can call InitProcess(). It seems cleaner to create sharedmemory explicitly in single user/bootstrap mode anyway.After this change the separation of bufmgr initialization intoInitBufferPoolAccess() / InitBufferPoolBackend() is not meaningful anymore sothe latter is removed.Author: Andres Freund <andres@anarazel.de>Reviewed-By: Kyotaro Horiguchi <horikyota.ntt@gmail.com>Discussion:https://postgr.es/m/20210802164124.ufo5buo4apl6yuvs@alap3.anarazel.de1 parent0de13bb commitb406478
File tree
8 files changed
+39
-83
lines changed- src
- backend
- bootstrap
- postmaster
- storage/buffer
- tcop
- utils/init
- include/storage
8 files changed
+39
-83
lines changedLines changed: 10 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
178 | 178 |
| |
179 | 179 |
| |
180 | 180 |
| |
181 |
| - | |
182 |
| - | |
| 181 | + | |
| 182 | + | |
183 | 183 |
| |
184 | 184 |
| |
185 | 185 |
| |
| |||
324 | 324 |
| |
325 | 325 |
| |
326 | 326 |
| |
327 |
| - | |
| 327 | + | |
328 | 328 |
| |
329 | 329 |
| |
330 | 330 |
| |
| |||
338 | 338 |
| |
339 | 339 |
| |
340 | 340 |
| |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
341 | 348 |
| |
342 | 349 |
| |
343 | 350 |
| |
| |||
348 | 355 |
| |
349 | 356 |
| |
350 | 357 |
| |
351 |
| - | |
352 |
| - | |
353 |
| - | |
354 |
| - | |
355 |
| - | |
356 | 358 |
| |
357 | 359 |
| |
358 | 360 |
| |
|
Lines changed: 6 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
469 | 469 |
| |
470 | 470 |
| |
471 | 471 |
| |
472 |
| - | |
473 |
| - | |
474 |
| - | |
475 | 472 |
| |
476 | 473 |
| |
477 | 474 |
| |
| |||
482 | 479 |
| |
483 | 480 |
| |
484 | 481 |
| |
| 482 | + | |
| 483 | + | |
| 484 | + | |
485 | 485 |
| |
486 | 486 |
| |
487 | 487 |
| |
| |||
1547 | 1547 |
| |
1548 | 1548 |
| |
1549 | 1549 |
| |
1550 |
| - | |
1551 |
| - | |
1552 |
| - | |
1553 | 1550 |
| |
1554 | 1551 |
| |
1555 | 1552 |
| |
| |||
1560 | 1557 |
| |
1561 | 1558 |
| |
1562 | 1559 |
| |
| 1560 | + | |
| 1561 | + | |
| 1562 | + | |
1563 | 1563 |
| |
1564 | 1564 |
| |
1565 | 1565 |
| |
|
Lines changed: 2 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
90 | 90 |
| |
91 | 91 |
| |
92 | 92 |
| |
93 |
| - | |
94 |
| - | |
95 | 93 |
| |
96 | 94 |
| |
97 | 95 |
| |
| |||
106 | 104 |
| |
107 | 105 |
| |
108 | 106 |
| |
| 107 | + | |
| 108 | + | |
109 | 109 |
| |
110 | 110 |
| |
111 | 111 |
| |
| |||
118 | 118 |
| |
119 | 119 |
| |
120 | 120 |
| |
121 |
| - | |
122 |
| - | |
123 |
| - | |
124 | 121 |
| |
125 | 122 |
| |
126 | 123 |
| |
|
Lines changed: 8 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
837 | 837 |
| |
838 | 838 |
| |
839 | 839 |
| |
840 |
| - | |
841 |
| - | |
842 |
| - | |
843 |
| - | |
844 |
| - | |
845 |
| - | |
846 |
| - | |
847 |
| - | |
848 | 840 |
| |
849 | 841 |
| |
850 | 842 |
| |
| |||
854 | 846 |
| |
855 | 847 |
| |
856 | 848 |
| |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
857 | 857 |
| |
858 | 858 |
| |
859 | 859 |
| |
|
Lines changed: 5 additions & 18 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2582 | 2582 |
| |
2583 | 2583 |
| |
2584 | 2584 |
| |
2585 |
| - | |
2586 |
| - | |
2587 |
| - | |
2588 |
| - | |
2589 |
| - | |
2590 | 2585 |
| |
2591 | 2586 |
| |
2592 | 2587 |
| |
| |||
2600 | 2595 |
| |
2601 | 2596 |
| |
2602 | 2597 |
| |
2603 |
| - | |
2604 | 2598 |
| |
2605 |
| - | |
2606 |
| - | |
2607 |
| - | |
2608 |
| - | |
2609 |
| - | |
2610 |
| - | |
2611 |
| - | |
2612 |
| - | |
2613 |
| - | |
2614 |
| - | |
2615 |
| - | |
2616 |
| - | |
| 2599 | + | |
| 2600 | + | |
| 2601 | + | |
| 2602 | + | |
| 2603 | + | |
2617 | 2604 |
| |
2618 | 2605 |
| |
2619 | 2606 |
| |
|
Lines changed: 5 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4050 | 4050 |
| |
4051 | 4051 |
| |
4052 | 4052 |
| |
4053 |
| - | |
4054 | 4053 |
| |
4055 |
| - | |
4056 |
| - | |
| 4054 | + | |
| 4055 | + | |
4057 | 4056 |
| |
4058 | 4057 |
| |
4059 | 4058 |
| |
| |||
4068 | 4067 |
| |
4069 | 4068 |
| |
4070 | 4069 |
| |
| 4070 | + | |
| 4071 | + | |
| 4072 | + | |
4071 | 4073 |
| |
4072 | 4074 |
| |
4073 | 4075 |
| |
|
Lines changed: 3 additions & 34 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
67 | 67 |
| |
68 | 68 |
| |
69 | 69 |
| |
70 |
| - | |
71 | 70 |
| |
72 | 71 |
| |
73 | 72 |
| |
| |||
417 | 416 |
| |
418 | 417 |
| |
419 | 418 |
| |
420 |
| - | |
421 |
| - | |
422 |
| - | |
423 |
| - | |
424 |
| - | |
425 |
| - | |
426 |
| - | |
427 |
| - | |
428 |
| - | |
429 |
| - | |
430 |
| - | |
431 |
| - | |
432 |
| - | |
433 |
| - | |
434 |
| - | |
435 |
| - | |
436 |
| - | |
437 |
| - | |
438 |
| - | |
439 |
| - | |
440 |
| - | |
441 |
| - | |
442 |
| - | |
443 |
| - | |
444 |
| - | |
445 | 419 |
| |
446 | 420 |
| |
447 | 421 |
| |
| |||
536 | 510 |
| |
537 | 511 |
| |
538 | 512 |
| |
| 513 | + | |
| 514 | + | |
539 | 515 |
| |
540 |
| - | |
541 |
| - | |
| 516 | + | |
542 | 517 |
| |
543 |
| - | |
544 | 518 |
| |
545 | 519 |
| |
546 | 520 |
| |
| |||
624 | 598 |
| |
625 | 599 |
| |
626 | 600 |
| |
627 |
| - | |
628 |
| - | |
629 |
| - | |
630 |
| - | |
631 |
| - | |
632 | 601 |
| |
633 | 602 |
| |
634 | 603 |
| |
|
Lines changed: 0 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
194 | 194 |
| |
195 | 195 |
| |
196 | 196 |
| |
197 |
| - | |
198 | 197 |
| |
199 | 198 |
| |
200 | 199 |
| |
|
0 commit comments
Comments
(0)