forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit80a8f95
committed
Remove support for background workers without BGWORKER_SHMEM_ACCESS.
Background workers without shared memory access have been broken onEXEC_BACKEND / windows builds since shortly after background workers have beenintroduced, without that being reported. Clearly they are not commonly used.The problem is that bgworker startup requires to be attached to shared memoryin EXEC_BACKEND child processes. StartBackgroundWorker() detaches from sharedmemory for unconnected workers, but at that point we already have initializedsubsystems referencing shared memory.Fixing this problem is not entirely trivial, so removing the option to not beconnected to shared memory seems the best way forward. In most use cases theadvantages of being connected to shared memory far outweigh the disadvantages.As there have been no reports about this issue so far, we have decided that itis not worth trying to address the problem in the back branches.Per discussion with Alvaro Herrera, Robert Haas and Tom Lane.Author: Andres Freund <andres@anarazel.de>Discussion:https://postgr.es/m/20210802065116.j763tz3vz4egqy3w@alap3.anarazel.de1 parent1d5135f commit80a8f95
File tree
4 files changed
+38
-63
lines changed- doc/src/sgml
- src
- backend/postmaster
- include/postmaster
4 files changed
+38
-63
lines changedLines changed: 3 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
14 |
| - | |
15 |
| - | |
| 14 | + | |
| 15 | + | |
16 | 16 |
| |
17 | 17 |
| |
18 | 18 |
| |
| |||
89 | 89 |
| |
90 | 90 |
| |
91 | 91 |
| |
92 |
| - | |
93 |
| - | |
94 |
| - | |
95 |
| - | |
96 |
| - | |
| 92 | + | |
97 | 93 |
| |
98 | 94 |
| |
99 | 95 |
| |
|
Lines changed: 25 additions & 42 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
652 | 652 |
| |
653 | 653 |
| |
654 | 654 |
| |
655 |
| - | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
656 | 663 |
| |
657 |
| - | |
658 |
| - | |
659 |
| - | |
660 |
| - | |
661 |
| - | |
662 |
| - | |
663 |
| - | |
664 |
| - | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
665 | 670 |
| |
| 671 | + | |
| 672 | + | |
666 | 673 |
| |
667 | 674 |
| |
668 | 675 |
| |
| |||
745 | 752 |
| |
746 | 753 |
| |
747 | 754 |
| |
748 |
| - | |
749 |
| - | |
750 |
| - | |
751 |
| - | |
752 |
| - | |
753 |
| - | |
754 |
| - | |
755 |
| - | |
756 |
| - | |
757 |
| - | |
758 |
| - | |
759 |
| - | |
760 |
| - | |
761 |
| - | |
762 | 755 |
| |
763 | 756 |
| |
764 | 757 |
| |
| |||
832 | 825 |
| |
833 | 826 |
| |
834 | 827 |
| |
835 |
| - | |
836 |
| - | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
837 | 832 |
| |
838 |
| - | |
839 |
| - | |
840 |
| - | |
841 |
| - | |
842 |
| - | |
843 |
| - | |
844 |
| - | |
845 |
| - | |
846 | 833 |
| |
847 |
| - | |
| 834 | + | |
848 | 835 |
| |
849 | 836 |
| |
850 |
| - | |
851 |
| - | |
852 |
| - | |
853 |
| - | |
854 |
| - | |
855 |
| - | |
856 |
| - | |
857 |
| - | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
858 | 841 |
| |
859 | 842 |
| |
860 | 843 |
| |
|
Lines changed: 9 additions & 14 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3302 | 3302 |
| |
3303 | 3303 |
| |
3304 | 3304 |
| |
3305 |
| - | |
3306 |
| - | |
3307 |
| - | |
| 3305 | + | |
| 3306 | + | |
3308 | 3307 |
| |
3309 |
| - | |
| 3308 | + | |
3310 | 3309 |
| |
3311 |
| - | |
3312 |
| - | |
3313 |
| - | |
3314 |
| - | |
3315 |
| - | |
| 3310 | + | |
| 3311 | + | |
3316 | 3312 |
| |
3317 | 3313 |
| |
3318 | 3314 |
| |
3319 |
| - | |
3320 |
| - | |
3321 |
| - | |
| 3315 | + | |
| 3316 | + | |
| 3317 | + | |
3322 | 3318 |
| |
3323 |
| - | |
3324 |
| - | |
| 3319 | + | |
3325 | 3320 |
| |
3326 | 3321 |
| |
3327 | 3322 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
48 | 48 |
| |
49 | 49 |
| |
50 | 50 |
| |
| 51 | + | |
51 | 52 |
| |
52 | 53 |
| |
53 | 54 |
| |
|
0 commit comments
Comments
(0)