forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit10a8d13
committed
Truncate line pointer array during heap pruning.
Reclaim space from the line pointer array when heap pruning leavesbehind a contiguous group of LP_UNUSED items at the end of the array.This happens during subsequent page defragmentation. Certain kinds ofheap line pointer bloat are ameliorated by this new optimization.Follow-up work to commit3c3b8a4, which taught VACUUM to truncate theline pointer array in about the same way during VACUUM's second passover the heap. We now apply line pointer array truncation during boththe first and the second pass over the heap made by VACUUM. We can alsoperform line pointer array truncation during opportunistic pruning.Matthias van de Meent, with small tweaks by me.Author: Matthias van de Meent <boekewurm+postgres@gmail.com>Discussion:https://postgr.es/m/CAEze2WjgaQc55Y5f5CQd3L=eS5CZcff2Obxp=O6pto8-f0hC4w@mail.gmail.comDiscussion:https://postgr.es/m/CAEze2Wg36%2B4at2eWJNcYNiW2FJmht34x3YeX54ctUSs7kKoNcA%40mail.gmail.com1 parent9d9c02c commit10a8d13
File tree
3 files changed
+33
-17
lines changed- src/backend
- access/heap
- storage/page
3 files changed
+33
-17
lines changedLines changed: 3 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
244 | 244 |
| |
245 | 245 |
| |
246 | 246 |
| |
247 |
| - | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
248 | 250 |
| |
249 | 251 |
| |
250 | 252 |
| |
|
Lines changed: 8 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
223 | 223 |
| |
224 | 224 |
| |
225 | 225 |
| |
226 |
| - | |
| 226 | + | |
227 | 227 |
| |
228 | 228 |
| |
229 | 229 |
| |
| |||
1393 | 1393 |
| |
1394 | 1394 |
| |
1395 | 1395 |
| |
1396 |
| - | |
| 1396 | + | |
1397 | 1397 |
| |
1398 | 1398 |
| |
1399 | 1399 |
| |
| |||
1561 | 1561 |
| |
1562 | 1562 |
| |
1563 | 1563 |
| |
| 1564 | + | |
| 1565 | + | |
| 1566 | + | |
| 1567 | + | |
| 1568 | + | |
1564 | 1569 |
| |
1565 | 1570 |
| |
1566 | 1571 |
| |
| |||
1768 | 1773 |
| |
1769 | 1774 |
| |
1770 | 1775 |
| |
1771 |
| - | |
| 1776 | + | |
1772 | 1777 |
| |
1773 | 1778 |
| |
1774 | 1779 |
| |
|
Lines changed: 22 additions & 13 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
688 | 688 |
| |
689 | 689 |
| |
690 | 690 |
| |
691 |
| - | |
692 |
| - | |
693 |
| - | |
694 |
| - | |
695 |
| - | |
696 |
| - | |
697 |
| - | |
698 |
| - | |
699 |
| - | |
700 |
| - | |
701 |
| - | |
702 |
| - | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
703 | 694 |
| |
704 | 695 |
| |
705 | 696 |
| |
706 |
| - | |
| 697 | + | |
| 698 | + | |
707 | 699 |
| |
708 | 700 |
| |
709 | 701 |
| |
| |||
718 | 710 |
| |
719 | 711 |
| |
720 | 712 |
| |
| 713 | + | |
721 | 714 |
| |
722 | 715 |
| |
723 | 716 |
| |
| |||
771 | 764 |
| |
772 | 765 |
| |
773 | 766 |
| |
| 767 | + | |
| 768 | + | |
774 | 769 |
| |
775 | 770 |
| |
776 | 771 |
| |
777 | 772 |
| |
| 773 | + | |
778 | 774 |
| |
779 | 775 |
| |
780 | 776 |
| |
| |||
798 | 794 |
| |
799 | 795 |
| |
800 | 796 |
| |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
801 | 810 |
| |
802 | 811 |
| |
803 | 812 |
| |
|
0 commit comments
Comments
(0)