- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit8c3e36f
committed
Reduce overhead of cache-clobber testing in LookupOpclassInfo().
Commit03ffc4d added logic to bypass all caching behavior inLookupOpclassInfo when CLOBBER_CACHE_ALWAYS is enabled. It doesn'tlook like I stopped to think much about what that would cost, butrecent investigation shows that the cost is enormous: it roughlydoubles the time needed for cache-clobber test runs.There does seem to be value in this behavior when trying to testthe opclass-cache loading logic itself, but for other purposes thecost is excessive. Hence, let's back off to doing this only whendebug_invalidate_system_caches_always is at least 3; or in olderbranches, when CLOBBER_CACHE_RECURSIVELY is defined.While here, clean up some other minor issues in LookupOpclassInfo.Re-order the code so we aren't left with broken cache entries (leadingto later core dumps) in the unlikely case that we suffer OOM whiletrying to allocate space for a new entry. (That seems to be myoversight in03ffc4d.) Also, in >= v13, stop allocating one arrayentry too many. That's evidently left over from sloppy reversion in851b14b.Back-patch to all supported branches, mainly to reduce the runtimeof cache-clobbering buildfarm animals.Discussion:https://postgr.es/m/1370856.1625428625@sss.pgh.pa.us1 parent9dd560c commit8c3e36f
1 file changed
+23
-20
lines changedLines changed: 23 additions & 20 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1701 | 1701 |
| |
1702 | 1702 |
| |
1703 | 1703 |
| |
| 1704 | + | |
| 1705 | + | |
| 1706 | + | |
| 1707 | + | |
1704 | 1708 |
| |
1705 | 1709 |
| |
1706 | 1710 |
| |
1707 | 1711 |
| |
1708 | 1712 |
| |
1709 |
| - | |
1710 |
| - | |
1711 |
| - | |
1712 |
| - | |
1713 | 1713 |
| |
1714 | 1714 |
| |
1715 | 1715 |
| |
| |||
1718 | 1718 |
| |
1719 | 1719 |
| |
1720 | 1720 |
| |
1721 |
| - | |
| 1721 | + | |
1722 | 1722 |
| |
1723 | 1723 |
| |
1724 |
| - | |
1725 |
| - | |
1726 |
| - | |
1727 |
| - | |
1728 |
| - | |
1729 |
| - | |
1730 |
| - | |
| 1724 | + | |
1731 | 1725 |
| |
1732 | 1726 |
| |
1733 | 1727 |
| |
1734 | 1728 |
| |
1735 | 1729 |
| |
1736 | 1730 |
| |
1737 | 1731 |
| |
1738 |
| - | |
1739 |
| - | |
1740 |
| - | |
1741 |
| - | |
1742 |
| - | |
| 1732 | + | |
| 1733 | + | |
| 1734 | + | |
| 1735 | + | |
| 1736 | + | |
| 1737 | + | |
| 1738 | + | |
1743 | 1739 |
| |
1744 |
| - | |
| 1740 | + | |
1745 | 1741 |
| |
1746 | 1742 |
| |
1747 | 1743 |
| |
1748 | 1744 |
| |
1749 | 1745 |
| |
1750 | 1746 |
| |
1751 | 1747 |
| |
1752 |
| - | |
1753 |
| - | |
| 1748 | + | |
| 1749 | + | |
| 1750 | + | |
| 1751 | + | |
| 1752 | + | |
| 1753 | + | |
| 1754 | + | |
| 1755 | + | |
| 1756 | + | |
1754 | 1757 |
| |
1755 | 1758 |
| |
1756 | 1759 |
| |
|
0 commit comments
Comments
(0)