- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit76c23bb
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 parent84dc6a4 commit76c23bb
1 file changed
+23
-20
lines changedLines changed: 23 additions & 20 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1597 | 1597 |
| |
1598 | 1598 |
| |
1599 | 1599 |
| |
| 1600 | + | |
| 1601 | + | |
| 1602 | + | |
| 1603 | + | |
1600 | 1604 |
| |
1601 | 1605 |
| |
1602 | 1606 |
| |
1603 | 1607 |
| |
1604 | 1608 |
| |
1605 |
| - | |
1606 |
| - | |
1607 |
| - | |
1608 |
| - | |
1609 | 1609 |
| |
1610 | 1610 |
| |
1611 | 1611 |
| |
| |||
1614 | 1614 |
| |
1615 | 1615 |
| |
1616 | 1616 |
| |
1617 |
| - | |
| 1617 | + | |
1618 | 1618 |
| |
1619 | 1619 |
| |
1620 |
| - | |
1621 |
| - | |
1622 |
| - | |
1623 |
| - | |
1624 |
| - | |
1625 |
| - | |
1626 |
| - | |
| 1620 | + | |
1627 | 1621 |
| |
1628 | 1622 |
| |
1629 | 1623 |
| |
1630 | 1624 |
| |
1631 | 1625 |
| |
1632 | 1626 |
| |
1633 | 1627 |
| |
1634 |
| - | |
1635 |
| - | |
1636 |
| - | |
1637 |
| - | |
1638 |
| - | |
| 1628 | + | |
| 1629 | + | |
| 1630 | + | |
| 1631 | + | |
| 1632 | + | |
| 1633 | + | |
| 1634 | + | |
1639 | 1635 |
| |
1640 |
| - | |
| 1636 | + | |
1641 | 1637 |
| |
1642 | 1638 |
| |
1643 | 1639 |
| |
1644 | 1640 |
| |
1645 | 1641 |
| |
1646 | 1642 |
| |
1647 | 1643 |
| |
1648 |
| - | |
1649 |
| - | |
| 1644 | + | |
| 1645 | + | |
| 1646 | + | |
| 1647 | + | |
| 1648 | + | |
| 1649 | + | |
| 1650 | + | |
| 1651 | + | |
| 1652 | + | |
1650 | 1653 |
| |
1651 | 1654 |
| |
1652 | 1655 |
| |
|
0 commit comments
Comments
(0)