forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitc6a3897
committed
Avoid useless respawining the autovacuum launcher at high speed.
When (1) autovacuum = off and (2) there's at least one database withan XID age greater than autovacuum_freeze_max_age and (3) all tablesin that database that need vacuuming are already being processed by aworker and (4) the autovacuum launcher is started, a kind of infiniteloop occurs. The launcher starts a worker and immediately exits. Theworker, finding no worker to do, immediately starts the launcher,supposedly so that the next database can be processed. But becausedatfrozenxid for that database hasn't been advanced yet, the newworker gets put right back into the same database as the old one,where it once again starts the launcher and exits. High-speed pingpong ensues.There are several possible ways to break the cycle; this seems likethe safest one.Amit Khandekar (code) and Robert Haas (comments), reviewed byÁlvaro Herrera.Discussion:http://postgr.es/m/CAJ3gD9eWejf72HKquKSzax0r+epS=nAbQKNnykkMA0E8c+rMDg@mail.gmail.com1 parent6546ffb commitc6a3897
1 file changed
+23
-1
lines changedLines changed: 23 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1898 | 1898 |
| |
1899 | 1899 |
| |
1900 | 1900 |
| |
| 1901 | + | |
| 1902 | + | |
1901 | 1903 |
| |
1902 | 1904 |
| |
1903 | 1905 |
| |
| |||
2307 | 2309 |
| |
2308 | 2310 |
| |
2309 | 2311 |
| |
| 2312 | + | |
2310 | 2313 |
| |
2311 | 2314 |
| |
2312 | 2315 |
| |
| |||
2433 | 2436 |
| |
2434 | 2437 |
| |
2435 | 2438 |
| |
| 2439 | + | |
| 2440 | + | |
2436 | 2441 |
| |
2437 | 2442 |
| |
2438 | 2443 |
| |
| |||
2470 | 2475 |
| |
2471 | 2476 |
| |
2472 | 2477 |
| |
| 2478 | + | |
| 2479 | + | |
| 2480 | + | |
| 2481 | + | |
| 2482 | + | |
| 2483 | + | |
| 2484 | + | |
| 2485 | + | |
| 2486 | + | |
| 2487 | + | |
| 2488 | + | |
| 2489 | + | |
| 2490 | + | |
| 2491 | + | |
| 2492 | + | |
| 2493 | + | |
2473 | 2494 |
| |
2474 |
| - | |
| 2495 | + | |
| 2496 | + | |
2475 | 2497 |
| |
2476 | 2498 |
| |
2477 | 2499 |
| |
|
0 commit comments
Comments
(0)