forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit07f1e06
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 parent9fa6fe4 commit07f1e06
1 file changed
+24
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1594 | 1594 | | |
1595 | 1595 | | |
1596 | 1596 | | |
| 1597 | + | |
| 1598 | + | |
| 1599 | + | |
| 1600 | + | |
1597 | 1601 | | |
1598 | 1602 | | |
1599 | 1603 | | |
1600 | 1604 | | |
1601 | | - | |
1602 | | - | |
1603 | | - | |
1604 | | - | |
1605 | 1605 | | |
1606 | 1606 | | |
1607 | 1607 | | |
| |||
1610 | 1610 | | |
1611 | 1611 | | |
1612 | 1612 | | |
1613 | | - | |
| 1613 | + | |
1614 | 1614 | | |
1615 | 1615 | | |
1616 | | - | |
1617 | | - | |
1618 | | - | |
1619 | | - | |
1620 | | - | |
1621 | | - | |
1622 | | - | |
| 1616 | + | |
1623 | 1617 | | |
1624 | 1618 | | |
1625 | 1619 | | |
1626 | 1620 | | |
1627 | 1621 | | |
1628 | 1622 | | |
1629 | 1623 | | |
1630 | | - | |
1631 | | - | |
1632 | | - | |
1633 | | - | |
1634 | | - | |
| 1624 | + | |
| 1625 | + | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
| 1629 | + | |
| 1630 | + | |
| 1631 | + | |
1635 | 1632 | | |
1636 | 1633 | | |
1637 | | - | |
| 1634 | + | |
1638 | 1635 | | |
1639 | 1636 | | |
1640 | 1637 | | |
1641 | 1638 | | |
1642 | 1639 | | |
1643 | 1640 | | |
1644 | 1641 | | |
1645 | | - | |
1646 | | - | |
| 1642 | + | |
| 1643 | + | |
| 1644 | + | |
| 1645 | + | |
| 1646 | + | |
| 1647 | + | |
| 1648 | + | |
| 1649 | + | |
| 1650 | + | |
1647 | 1651 | | |
1648 | 1652 | | |
1649 | 1653 | | |
| |||
0 commit comments
Comments
(0)