- Notifications
You must be signed in to change notification settings - Fork5.1k
Commit3edc2db
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 parent73ede4d commit3edc2db
1 file changed
+23
-20
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1612 | 1612 |
| |
1613 | 1613 |
| |
1614 | 1614 |
| |
| 1615 | + | |
| 1616 | + | |
| 1617 | + | |
| 1618 | + | |
1615 | 1619 |
| |
1616 | 1620 |
| |
1617 | 1621 |
| |
1618 | 1622 |
| |
1619 | 1623 |
| |
1620 |
| - | |
1621 |
| - | |
1622 |
| - | |
1623 |
| - | |
1624 | 1624 |
| |
1625 | 1625 |
| |
1626 | 1626 |
| |
| |||
1629 | 1629 |
| |
1630 | 1630 |
| |
1631 | 1631 |
| |
1632 |
| - | |
| 1632 | + | |
1633 | 1633 |
| |
1634 | 1634 |
| |
1635 |
| - | |
1636 |
| - | |
1637 |
| - | |
1638 |
| - | |
1639 |
| - | |
1640 |
| - | |
1641 |
| - | |
| 1635 | + | |
1642 | 1636 |
| |
1643 | 1637 |
| |
1644 | 1638 |
| |
1645 | 1639 |
| |
1646 | 1640 |
| |
1647 | 1641 |
| |
1648 | 1642 |
| |
1649 |
| - | |
1650 |
| - | |
1651 |
| - | |
1652 |
| - | |
1653 |
| - | |
| 1643 | + | |
| 1644 | + | |
| 1645 | + | |
| 1646 | + | |
| 1647 | + | |
| 1648 | + | |
| 1649 | + | |
1654 | 1650 |
| |
1655 |
| - | |
| 1651 | + | |
1656 | 1652 |
| |
1657 | 1653 |
| |
1658 | 1654 |
| |
1659 | 1655 |
| |
1660 | 1656 |
| |
1661 | 1657 |
| |
1662 | 1658 |
| |
1663 |
| - | |
1664 |
| - | |
| 1659 | + | |
| 1660 | + | |
| 1661 | + | |
| 1662 | + | |
| 1663 | + | |
| 1664 | + | |
| 1665 | + | |
| 1666 | + | |
| 1667 | + | |
1665 | 1668 |
| |
1666 | 1669 |
| |
1667 | 1670 |
| |
|
0 commit comments
Comments
(0)