- Notifications
You must be signed in to change notification settings - Fork5
Commit20cb18d
committed
Make catalog cache hash tables resizeable.
If the hash table backing a catalog cache becomes too full (fillfactor > 2),enlarge it. A new buckets array, double the size of the old, is allocated,and all entries in the old hash are moved to the right bucket in the newhash.This has two benefits. First, cache lookups don't get so expensive whenthere are lots of entries in a cache, like if you access hundreds ofthousands of tables. Second, we can make the (initial) sizes of the cachesmuch smaller, which saves memory.This patch dials down the initial sizes of the catcaches. The new sizes arechosen so that a backend that only runs a few basic queries still won't needto enlarge any of them.1 parentb1892aa commit20cb18d
File tree
3 files changed
+102
-58
lines changed- src
- backend/utils/cache
- include/utils
3 files changed
+102
-58
lines changedLines changed: 48 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
734 | 734 |
| |
735 | 735 |
| |
736 | 736 |
| |
737 |
| - | |
738 |
| - | |
739 |
| - | |
| 737 | + | |
| 738 | + | |
740 | 739 |
| |
741 | 740 |
| |
742 | 741 |
| |
| |||
775 | 774 |
| |
776 | 775 |
| |
777 | 776 |
| |
778 |
| - | |
| 777 | + | |
| 778 | + | |
779 | 779 |
| |
780 | 780 |
| |
781 | 781 |
| |
| |||
813 | 813 |
| |
814 | 814 |
| |
815 | 815 |
| |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
816 | 853 |
| |
817 | 854 |
| |
818 | 855 |
| |
| |||
1684 | 1721 |
| |
1685 | 1722 |
| |
1686 | 1723 |
| |
| 1724 | + | |
| 1725 | + | |
| 1726 | + | |
| 1727 | + | |
| 1728 | + | |
| 1729 | + | |
| 1730 | + | |
1687 | 1731 |
| |
1688 | 1732 |
| |
1689 | 1733 |
| |
|
0 commit comments
Comments
(0)