forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork0
Commit52ca757
committed
Fix autovacuum work item error handling
In autovacuum's "work item" processing, a few strings were allocated inthe current transaction's memory context, which goes away during errorhandling; if an error happened during execution of the work item, thepfree() calls to clean up afterwards would try to release already-releasedmemory, possibly leading to a crash. In branch master, this was alreadyfixed by commit335f3d0, so backpatch that to REL_10_STABLE to fixthe problem there too.As a secondary problem, verify that the autovacuum worker is connectedto the right database for each work item; otherwise some items would bediscarded by workers in other databases.Reported-by: Justin PryzbyDiscussion:https://postgr.es/m/20171014035732.GB31726@telsasoft.com1 parent0f1fbe7 commit52ca757
1 file changed
+20
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2444 | 2444 | | |
2445 | 2445 | | |
2446 | 2446 | | |
| 2447 | + | |
| 2448 | + | |
| 2449 | + | |
2447 | 2450 | | |
2448 | | - | |
2449 | 2451 | | |
2450 | 2452 | | |
2451 | 2453 | | |
| |||
2482 | 2484 | | |
2483 | 2485 | | |
2484 | 2486 | | |
| 2487 | + | |
| 2488 | + | |
| 2489 | + | |
2485 | 2490 | | |
2486 | 2491 | | |
2487 | 2492 | | |
| |||
2525 | 2530 | | |
2526 | 2531 | | |
2527 | 2532 | | |
| 2533 | + | |
| 2534 | + | |
2528 | 2535 | | |
2529 | 2536 | | |
2530 | 2537 | | |
| |||
2533 | 2540 | | |
2534 | 2541 | | |
2535 | 2542 | | |
2536 | | - | |
2537 | | - | |
| 2543 | + | |
2538 | 2544 | | |
2539 | 2545 | | |
2540 | 2546 | | |
| |||
2601 | 2607 | | |
2602 | 2608 | | |
2603 | 2609 | | |
2604 | | - | |
2605 | | - | |
2606 | | - | |
| 2610 | + | |
2607 | 2611 | | |
| 2612 | + | |
2608 | 2613 | | |
2609 | 2614 | | |
2610 | 2615 | | |
| |||
2614 | 2619 | | |
2615 | 2620 | | |
2616 | 2621 | | |
| 2622 | + | |
| 2623 | + | |
| 2624 | + | |
2617 | 2625 | | |
2618 | 2626 | | |
2619 | 2627 | | |
| |||
2622 | 2630 | | |
2623 | 2631 | | |
2624 | 2632 | | |
2625 | | - | |
2626 | | - | |
| 2633 | + | |
| 2634 | + | |
2627 | 2635 | | |
| 2636 | + | |
2628 | 2637 | | |
2629 | 2638 | | |
2630 | 2639 | | |
| |||
2668 | 2677 | | |
2669 | 2678 | | |
2670 | 2679 | | |
| 2680 | + | |
| 2681 | + | |
| 2682 | + | |
2671 | 2683 | | |
2672 | 2684 | | |
2673 | 2685 | | |
| |||
0 commit comments
Comments
(0)