forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit5749f6e
committed
Rewrite btree vacuuming to fold the former bulkdelete and cleanup operations
into a single mostly-physical-order scan of the index. This requires someticklish interlocking considerations, but should create no materialperformance impact on normal index operations (at least given thealready-committed changes to make scans work a page at a time). VACUUMitself should get significantly faster in any index that's degenerated to avery nonlinear page order. Also, we save one pass over the index entirely,except in the case where there were no deletions to do and so only one passhappened anyway.Original patch by Heikki Linnakangas, rework by Tom Lane.1 parent09cb5c0 commit5749f6e
File tree
10 files changed
+682
-243
lines changed- src
- backend
- access/nbtree
- storage/ipc
- include
- access
- storage
10 files changed
+682
-243
lines changedLines changed: 27 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 |
| - | |
| 1 | + | |
2 | 2 |
| |
3 | 3 |
| |
4 | 4 |
| |
| |||
293 | 293 |
| |
294 | 294 |
| |
295 | 295 |
| |
296 |
| - | |
297 |
| - | |
298 |
| - | |
299 |
| - | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
300 | 322 |
| |
301 | 323 |
| |
302 | 324 |
| |
|
Lines changed: 22 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
700 | 700 |
| |
701 | 701 |
| |
702 | 702 |
| |
| 703 | + | |
703 | 704 |
| |
704 |
| - | |
| 705 | + | |
705 | 706 |
| |
706 | 707 |
| |
707 | 708 |
| |
708 | 709 |
| |
709 | 710 |
| |
710 | 711 |
| |
| 712 | + | |
| 713 | + | |
| 714 | + | |
711 | 715 |
| |
712 | 716 |
| |
713 | 717 |
| |
| |||
836 | 840 |
| |
837 | 841 |
| |
838 | 842 |
| |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
839 | 858 |
| |
840 | 859 |
| |
841 | 860 |
| |
| |||
1445 | 1464 |
| |
1446 | 1465 |
| |
1447 | 1466 |
| |
| 1467 | + | |
1448 | 1468 |
| |
1449 | 1469 |
| |
1450 | 1470 |
| |
|
Lines changed: 12 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
9 | 9 |
| |
10 | 10 |
| |
11 | 11 |
| |
12 |
| - | |
| 12 | + | |
13 | 13 |
| |
14 | 14 |
| |
15 | 15 |
| |
| |||
206 | 206 |
| |
207 | 207 |
| |
208 | 208 |
| |
| 209 | + | |
209 | 210 |
| |
210 | 211 |
| |
211 | 212 |
| |
| |||
544 | 545 |
| |
545 | 546 |
| |
546 | 547 |
| |
547 |
| - | |
| 548 | + | |
548 | 549 |
| |
549 | 550 |
| |
550 | 551 |
| |
| |||
608 | 609 |
| |
609 | 610 |
| |
610 | 611 |
| |
611 |
| - | |
| 612 | + | |
612 | 613 |
| |
613 | 614 |
| |
614 | 615 |
| |
| |||
651 | 652 |
| |
652 | 653 |
| |
653 | 654 |
| |
| 655 | + | |
654 | 656 |
| |
655 | 657 |
| |
656 | 658 |
| |
657 | 659 |
| |
658 | 660 |
| |
659 | 661 |
| |
660 | 662 |
| |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
661 | 670 |
| |
662 | 671 |
| |
663 | 672 |
| |
|
0 commit comments
Comments
(0)