forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit2bdf1b2
committed
Reserve a PGPROC slot and semaphore for the slotsync worker process.
The need for this was missed in commit93db6cb, with the resultbeing that if we launch a slotsync worker it would consume one ofthe PGPROCs in the max_connections pool. That could lead to inabilityto launch the worker, or to subsequent failures of connection requeststhat should have succeeded according to the configured settings.Rather than create some one-off infrastructure to support this,let's group the slotsync worker with the existing autovac launcherin a new category of "special worker" processes. These are kind oflike auxiliary processes, but they cannot use that infrastructurebecause they need to be able to run transactions.For the moment, make these processes share the PGPROC freelistused for autovac workers (which previously supplied the autovaclauncher too). This is partly to avoid an ABI change in v17,and partly because it seems silly to have a freelist withat most two members. This might be worth revisiting if we growenough workers in this category.Tom Lane and Hou Zhijie. Back-patch to v17.Discussion:https://postgr.es/m/1808397.1735156190@sss.pgh.pa.us1 parentff90ee6 commit2bdf1b2
File tree
4 files changed
+44
-24
lines changed- src
- backend
- storage/lmgr
- utils/init
- include
- storage
4 files changed
+44
-24
lines changedLines changed: 21 additions & 16 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
197 | 197 |
| |
198 | 198 |
| |
199 | 199 |
| |
200 |
| - | |
201 |
| - | |
202 |
| - | |
203 |
| - | |
204 |
| - | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
205 | 206 |
| |
206 | 207 |
| |
207 | 208 |
| |
| |||
269 | 270 |
| |
270 | 271 |
| |
271 | 272 |
| |
272 |
| - | |
273 |
| - | |
274 |
| - | |
275 |
| - | |
276 |
| - | |
277 |
| - | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
278 | 280 |
| |
279 | 281 |
| |
280 | 282 |
| |
281 | 283 |
| |
282 | 284 |
| |
283 | 285 |
| |
284 | 286 |
| |
285 |
| - | |
| 287 | + | |
286 | 288 |
| |
287 |
| - | |
| 289 | + | |
288 | 290 |
| |
289 | 291 |
| |
290 | 292 |
| |
291 |
| - | |
| 293 | + | |
292 | 294 |
| |
293 | 295 |
| |
294 | 296 |
| |
| |||
358 | 360 |
| |
359 | 361 |
| |
360 | 362 |
| |
361 |
| - | |
362 |
| - | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
363 | 368 |
| |
364 | 369 |
| |
365 | 370 |
| |
|
Lines changed: 4 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
544 | 544 |
| |
545 | 545 |
| |
546 | 546 |
| |
547 |
| - | |
548 |
| - | |
549 |
| - | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
550 | 550 |
| |
551 | 551 |
| |
552 | 552 |
| |
| |||
555 | 555 |
| |
556 | 556 |
| |
557 | 557 |
| |
558 |
| - | |
| 558 | + | |
559 | 559 |
| |
560 | 560 |
| |
561 | 561 |
| |
|
Lines changed: 7 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
350 | 350 |
| |
351 | 351 |
| |
352 | 352 |
| |
353 |
| - | |
354 |
| - | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
355 | 356 |
| |
356 | 357 |
| |
357 | 358 |
| |
| |||
388 | 389 |
| |
389 | 390 |
| |
390 | 391 |
| |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
391 | 396 |
| |
392 | 397 |
| |
393 | 398 |
| |
|
Lines changed: 12 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
408 | 408 |
| |
409 | 409 |
| |
410 | 410 |
| |
411 |
| - | |
| 411 | + | |
412 | 412 |
| |
413 | 413 |
| |
414 | 414 |
| |
| |||
442 | 442 |
| |
443 | 443 |
| |
444 | 444 |
| |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
445 | 454 |
| |
446 | 455 |
| |
447 |
| - | |
| 456 | + | |
| 457 | + | |
448 | 458 |
| |
449 | 459 |
| |
450 | 460 |
| |
|
0 commit comments
Comments
(0)