- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit6bc8ef0
committed
Add new GUC, max_worker_processes, limiting number of bgworkers.
In 9.3, there's no particular limit on the number of bgworkers;instead, we just count up the number that are actually registered,and use that to set MaxBackends. However, that approach causesproblems for Hot Standby, which needs both MaxBackends and thesize of the lock table to be the same on the standby as on themaster, yet it may not be desirable to run the same bgworkers inboth places. 9.3 handles that by failing to notice the problem,which will probably work fine in nearly all cases anyway, but isnot theoretically sound.A further problem with simply counting the number of registeredworkers is that new workers can't be registered without apostmaster restart. This is inconvenient for administrators,since bouncing the postmaster causes an interruption of service.Moreover, there are a number of applications for backgroundprocesses where, by necessity, the background process must bestarted on the fly (e.g. parallel query). While this patchdoesn't actually make it possible to register new backgroundworkers after startup time, it's a necessary prerequisite.Patch by me. Review by Michael Paquier.1 parent5cbe935 commit6bc8ef0
File tree
15 files changed
+77
-59
lines changed- doc/src/sgml
- src
- backend
- access
- rmgrdesc
- transam
- postmaster
- storage/lmgr
- utils
- init
- misc
- bin
- pg_controldata
- pg_resetxlog
- include
- access
- catalog
15 files changed
+77
-59
lines changedLines changed: 5 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
146 | 146 |
| |
147 | 147 |
| |
148 | 148 |
| |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
149 | 154 |
|
Lines changed: 19 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1595 | 1595 |
| |
1596 | 1596 |
| |
1597 | 1597 |
| |
| 1598 | + | |
| 1599 | + | |
| 1600 | + | |
| 1601 | + | |
| 1602 | + | |
| 1603 | + | |
| 1604 | + | |
| 1605 | + | |
| 1606 | + | |
| 1607 | + | |
| 1608 | + | |
| 1609 | + | |
| 1610 | + | |
| 1611 | + | |
| 1612 | + | |
| 1613 | + | |
| 1614 | + | |
| 1615 | + | |
| 1616 | + | |
1598 | 1617 |
| |
1599 | 1618 |
| |
1600 | 1619 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
117 | 117 |
| |
118 | 118 |
| |
119 | 119 |
| |
120 |
| - | |
| 120 | + | |
121 | 121 |
| |
| 122 | + | |
122 | 123 |
| |
123 | 124 |
| |
124 | 125 |
| |
|
Lines changed: 8 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4134 | 4134 |
| |
4135 | 4135 |
| |
4136 | 4136 |
| |
| 4137 | + | |
4137 | 4138 |
| |
4138 | 4139 |
| |
4139 | 4140 |
| |
| |||
4841 | 4842 |
| |
4842 | 4843 |
| |
4843 | 4844 |
| |
| 4845 | + | |
| 4846 | + | |
| 4847 | + | |
4844 | 4848 |
| |
4845 | 4849 |
| |
4846 | 4850 |
| |
| |||
7770 | 7774 |
| |
7771 | 7775 |
| |
7772 | 7776 |
| |
| 7777 | + | |
7773 | 7778 |
| |
7774 | 7779 |
| |
7775 | 7780 |
| |
| |||
7786 | 7791 |
| |
7787 | 7792 |
| |
7788 | 7793 |
| |
| 7794 | + | |
7789 | 7795 |
| |
7790 | 7796 |
| |
7791 | 7797 |
| |
| |||
7799 | 7805 |
| |
7800 | 7806 |
| |
7801 | 7807 |
| |
| 7808 | + | |
7802 | 7809 |
| |
7803 | 7810 |
| |
7804 | 7811 |
| |
| |||
8184 | 8191 |
| |
8185 | 8192 |
| |
8186 | 8193 |
| |
| 8194 | + | |
8187 | 8195 |
| |
8188 | 8196 |
| |
8189 | 8197 |
| |
|
Lines changed: 6 additions & 48 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
402 | 402 |
| |
403 | 403 |
| |
404 | 404 |
| |
405 |
| - | |
406 | 405 |
| |
407 | 406 |
| |
408 | 407 |
| |
| |||
5212 | 5211 |
| |
5213 | 5212 |
| |
5214 | 5213 |
| |
5215 |
| - | |
| 5214 | + | |
5216 | 5215 |
| |
5217 | 5216 |
| |
5218 | 5217 |
| |
| |||
5226 | 5225 |
| |
5227 | 5226 |
| |
5228 | 5227 |
| |
5229 |
| - | |
5230 | 5228 |
| |
5231 | 5229 |
| |
5232 | 5230 |
| |
| |||
5238 | 5236 |
| |
5239 | 5237 |
| |
5240 | 5238 |
| |
5241 |
| - | |
5242 |
| - | |
5243 |
| - | |
5244 |
| - | |
5245 |
| - | |
5246 | 5239 |
| |
5247 | 5240 |
| |
5248 | 5241 |
| |
| |||
5298 | 5291 |
| |
5299 | 5292 |
| |
5300 | 5293 |
| |
5301 |
| - | |
5302 |
| - | |
5303 |
| - | |
| 5294 | + | |
| 5295 | + | |
5304 | 5296 |
| |
5305 |
| - | |
| 5297 | + | |
5306 | 5298 |
| |
5307 | 5299 |
| |
5308 | 5300 |
| |
5309 | 5301 |
| |
5310 | 5302 |
| |
5311 |
| - | |
| 5303 | + | |
| 5304 | + | |
5312 | 5305 |
| |
5313 | 5306 |
| |
5314 | 5307 |
| |
| |||
5589 | 5582 |
| |
5590 | 5583 |
| |
5591 | 5584 |
| |
5592 |
| - | |
5593 |
| - | |
5594 |
| - | |
5595 |
| - | |
5596 |
| - | |
5597 |
| - | |
5598 |
| - | |
5599 |
| - | |
5600 |
| - | |
5601 |
| - | |
5602 |
| - | |
5603 |
| - | |
5604 |
| - | |
5605 |
| - | |
5606 |
| - | |
5607 |
| - | |
5608 |
| - | |
5609 |
| - | |
5610 |
| - | |
5611 |
| - | |
5612 |
| - | |
5613 |
| - | |
5614 |
| - | |
5615 |
| - | |
5616 |
| - | |
5617 |
| - | |
5618 |
| - | |
5619 |
| - | |
5620 |
| - | |
5621 |
| - | |
5622 |
| - | |
5623 |
| - | |
5624 |
| - | |
5625 |
| - | |
5626 |
| - | |
5627 | 5585 |
| |
5628 | 5586 |
| |
5629 | 5587 |
| |
|
Lines changed: 2 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
140 | 140 |
| |
141 | 141 |
| |
142 | 142 |
| |
143 |
| - | |
144 |
| - | |
145 |
| - | |
146 |
| - | |
| 143 | + | |
| 144 | + | |
147 | 145 |
| |
148 | 146 |
| |
149 | 147 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
109 | 109 |
| |
110 | 110 |
| |
111 | 111 |
| |
| 112 | + | |
112 | 113 |
| |
113 | 114 |
| |
114 | 115 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
436 | 436 |
| |
437 | 437 |
| |
438 | 438 |
| |
439 |
| - | |
| 439 | + | |
440 | 440 |
| |
441 | 441 |
| |
442 | 442 |
| |
|
Lines changed: 24 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
190 | 190 |
| |
191 | 191 |
| |
192 | 192 |
| |
| 193 | + | |
193 | 194 |
| |
194 | 195 |
| |
195 | 196 |
| |
| |||
2158 | 2159 |
| |
2159 | 2160 |
| |
2160 | 2161 |
| |
| 2162 | + | |
| 2163 | + | |
| 2164 | + | |
| 2165 | + | |
| 2166 | + | |
| 2167 | + | |
| 2168 | + | |
| 2169 | + | |
| 2170 | + | |
| 2171 | + | |
| 2172 | + | |
| 2173 | + | |
2161 | 2174 |
| |
2162 | 2175 |
| |
2163 | 2176 |
| |
| |||
8667 | 8680 |
| |
8668 | 8681 |
| |
8669 | 8682 |
| |
8670 |
| - | |
8671 |
| - | |
| 8683 | + | |
| 8684 | + | |
8672 | 8685 |
| |
8673 | 8686 |
| |
8674 | 8687 |
| |
8675 | 8688 |
| |
8676 | 8689 |
| |
8677 | 8690 |
| |
8678 | 8691 |
| |
8679 |
| - | |
8680 |
| - | |
| 8692 | + | |
| 8693 | + | |
| 8694 | + | |
| 8695 | + | |
| 8696 | + | |
| 8697 | + | |
| 8698 | + | |
| 8699 | + | |
| 8700 | + | |
8681 | 8701 |
| |
8682 | 8702 |
| |
8683 | 8703 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
152 | 152 |
| |
153 | 153 |
| |
154 | 154 |
| |
| 155 | + | |
155 | 156 |
| |
156 | 157 |
| |
157 | 158 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
260 | 260 |
| |
261 | 261 |
| |
262 | 262 |
| |
| 263 | + | |
| 264 | + | |
263 | 265 |
| |
264 | 266 |
| |
265 | 267 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
518 | 518 |
| |
519 | 519 |
| |
520 | 520 |
| |
| 521 | + | |
521 | 522 |
| |
522 | 523 |
| |
523 | 524 |
| |
| |||
664 | 665 |
| |
665 | 666 |
| |
666 | 667 |
| |
| 668 | + | |
667 | 669 |
| |
668 | 670 |
| |
669 | 671 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
55 | 55 |
| |
56 | 56 |
| |
57 | 57 |
| |
58 |
| - | |
| 58 | + | |
59 | 59 |
| |
60 | 60 |
| |
61 | 61 |
| |
| |||
205 | 205 |
| |
206 | 206 |
| |
207 | 207 |
| |
| 208 | + | |
208 | 209 |
| |
209 | 210 |
| |
210 | 211 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
172 | 172 |
| |
173 | 173 |
| |
174 | 174 |
| |
| 175 | + | |
175 | 176 |
| |
176 | 177 |
| |
177 | 178 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
141 | 141 |
| |
142 | 142 |
| |
143 | 143 |
| |
| 144 | + | |
144 | 145 |
| |
145 | 146 |
| |
146 | 147 |
| |
|
0 commit comments
Comments
(0)