- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit2f48711
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 parent27621cc commit2f48711
1 file changed
+23
-20
lines changedLines changed: 23 additions & 20 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1622 | 1622 |
| |
1623 | 1623 |
| |
1624 | 1624 |
| |
| 1625 | + | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
1625 | 1629 |
| |
1626 | 1630 |
| |
1627 | 1631 |
| |
1628 | 1632 |
| |
1629 | 1633 |
| |
1630 |
| - | |
1631 |
| - | |
1632 |
| - | |
1633 |
| - | |
1634 | 1634 |
| |
1635 | 1635 |
| |
1636 | 1636 |
| |
| |||
1639 | 1639 |
| |
1640 | 1640 |
| |
1641 | 1641 |
| |
1642 |
| - | |
| 1642 | + | |
1643 | 1643 |
| |
1644 | 1644 |
| |
1645 |
| - | |
1646 |
| - | |
1647 |
| - | |
1648 |
| - | |
1649 |
| - | |
1650 |
| - | |
1651 |
| - | |
| 1645 | + | |
1652 | 1646 |
| |
1653 | 1647 |
| |
1654 | 1648 |
| |
1655 | 1649 |
| |
1656 | 1650 |
| |
1657 | 1651 |
| |
1658 | 1652 |
| |
1659 |
| - | |
1660 |
| - | |
1661 |
| - | |
1662 |
| - | |
1663 |
| - | |
| 1653 | + | |
| 1654 | + | |
| 1655 | + | |
| 1656 | + | |
| 1657 | + | |
| 1658 | + | |
| 1659 | + | |
1664 | 1660 |
| |
1665 |
| - | |
| 1661 | + | |
1666 | 1662 |
| |
1667 | 1663 |
| |
1668 | 1664 |
| |
1669 | 1665 |
| |
1670 | 1666 |
| |
1671 | 1667 |
| |
1672 | 1668 |
| |
1673 |
| - | |
1674 |
| - | |
| 1669 | + | |
| 1670 | + | |
| 1671 | + | |
| 1672 | + | |
| 1673 | + | |
| 1674 | + | |
| 1675 | + | |
| 1676 | + | |
| 1677 | + | |
1675 | 1678 |
| |
1676 | 1679 |
| |
1677 | 1680 |
| |
|
0 commit comments
Comments
(0)