forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit26b4386
committed
Only allow autovacuum to be auto-canceled by a directly blocked process.
In the original coding of the autovacuum cancel feature, commitacac68b, an autovacuum process wasconsidered a target for cancellation if it was found to hard-block anyprocess examined in the deadlock search. This patch tightens the test sothat the autovacuum must directly hard-block the current process. Thisshould make the behavior more predictable in general, and in particularit ensures that an autovacuum will not be canceled with less thandeadlock_timeout grace period. In the old coding, it was possible for anautovacuum to be canceled almost instantly, given unfortunate timing of twoor more other processes' lock attempts.This also justifies the logging methodology in the recent commitd7318d4; without this restriction, thatpatch isn't providing enough information to see the connection of thecanceling process to the autovacuum. Like that one, patch all the wayback.1 parentd20cdd3 commit26b4386
1 file changed
+28
-20
lines changedLines changed: 28 additions & 20 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
527 | 527 |
| |
528 | 528 |
| |
529 | 529 |
| |
530 |
| - | |
531 |
| - | |
532 |
| - | |
533 |
| - | |
534 |
| - | |
535 |
| - | |
536 |
| - | |
537 |
| - | |
538 |
| - | |
539 |
| - | |
540 |
| - | |
541 |
| - | |
542 |
| - | |
543 |
| - | |
544 |
| - | |
545 |
| - | |
546 |
| - | |
547 |
| - | |
548 |
| - | |
549 | 530 |
| |
550 | 531 |
| |
551 | 532 |
| |
| |||
559 | 540 |
| |
560 | 541 |
| |
561 | 542 |
| |
562 |
| - | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
563 | 571 |
| |
564 | 572 |
| |
565 | 573 |
| |
|
0 commit comments
Comments
(0)