- Notifications
You must be signed in to change notification settings - Fork5
Commit520bcd9
committed
Fix bugs in indexing of in-doubt HOT-updated tuples.
If we find a DELETE_IN_PROGRESS HOT-updated tuple, it is impossible to knowwhether to index it or not except by waiting to see if the deletingtransaction commits. If it doesn't, the tuple might again be LIVE, meaningwe have to index it. So wait and recheck in that case.Also, we must not rely on ii_BrokenHotChain to decide that it's possible toomit tuples from the index. That could result in omitting tuples that weneed, particularly in view of yesterday's fixes to not necessarily setindcheckxmin (but it's broken even without that, as per my analysis today).Since this is just an extremely marginal performance optimization, droppingthe test shouldn't hurt.These cases are only expected to happen in system catalogs (they'repossible there due to early release of RowExclusiveLock in mostcatalog-update code paths). Since reindexing of a system catalog isn't aparticularly performance-critical operation anyway, there's no real need tobe concerned about possible performance degradation from these changes.The worst aspects of this bug were introduced in 9.0 --- 8.x will alwayswait out a DELETE_IN_PROGRESS tuple. But I think dropping index entrieson the strength of ii_BrokenHotChain is dangerous even without that, soback-patch removal of that optimization to 8.3 and 8.4.1 parent9ad7e15 commit520bcd9
1 file changed
+42
-20
lines changedLines changed: 42 additions & 20 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1840 | 1840 |
| |
1841 | 1841 |
| |
1842 | 1842 |
| |
1843 |
| - | |
1844 |
| - | |
| 1843 | + | |
| 1844 | + | |
| 1845 | + | |
1845 | 1846 |
| |
1846 | 1847 |
| |
1847 | 1848 |
| |
| |||
1953 | 1954 |
| |
1954 | 1955 |
| |
1955 | 1956 |
| |
| 1957 | + | |
| 1958 | + | |
| 1959 | + | |
| 1960 | + | |
| 1961 | + | |
1956 | 1962 |
| |
1957 |
| - | |
| 1963 | + | |
| 1964 | + | |
1958 | 1965 |
| |
1959 | 1966 |
| |
1960 | 1967 |
| |
| |||
2008 | 2015 |
| |
2009 | 2016 |
| |
2010 | 2017 |
| |
2011 |
| - | |
2012 |
| - | |
2013 |
| - | |
2014 |
| - | |
2015 |
| - | |
2016 | 2018 |
| |
2017 | 2019 |
| |
2018 | 2020 |
| |
2019 | 2021 |
| |
2020 | 2022 |
| |
2021 | 2023 |
| |
2022 | 2024 |
| |
2023 |
| - | |
2024 |
| - | |
2025 | 2025 |
| |
2026 | 2026 |
| |
2027 | 2027 |
| |
| |||
2071 | 2071 |
| |
2072 | 2072 |
| |
2073 | 2073 |
| |
2074 |
| - | |
| 2074 | + | |
| 2075 | + | |
2075 | 2076 |
| |
2076 | 2077 |
| |
2077 | 2078 |
| |
| |||
2086 | 2087 |
| |
2087 | 2088 |
| |
2088 | 2089 |
| |
| 2090 | + | |
| 2091 | + | |
| 2092 | + | |
| 2093 | + | |
| 2094 | + | |
| 2095 | + | |
| 2096 | + | |
| 2097 | + | |
2089 | 2098 |
| |
2090 |
| - | |
| 2099 | + | |
| 2100 | + | |
2091 | 2101 |
| |
2092 | 2102 |
| |
2093 | 2103 |
| |
| |||
2096 | 2106 |
| |
2097 | 2107 |
| |
2098 | 2108 |
| |
2099 |
| - | |
2100 | 2109 |
| |
2101 |
| - | |
2102 |
| - | |
2103 |
| - | |
2104 |
| - | |
2105 |
| - | |
| 2110 | + | |
| 2111 | + | |
| 2112 | + | |
| 2113 | + | |
| 2114 | + | |
| 2115 | + | |
| 2116 | + | |
2106 | 2117 |
| |
| 2118 | + | |
| 2119 | + | |
| 2120 | + | |
| 2121 | + | |
| 2122 | + | |
| 2123 | + | |
2107 | 2124 |
| |
2108 | 2125 |
| |
2109 | 2126 |
| |
2110 | 2127 |
| |
2111 |
| - | |
2112 |
| - | |
2113 | 2128 |
| |
| 2129 | + | |
| 2130 | + | |
| 2131 | + | |
| 2132 | + | |
| 2133 | + | |
| 2134 | + | |
2114 | 2135 |
| |
| 2136 | + | |
2115 | 2137 |
| |
2116 | 2138 |
| |
2117 | 2139 |
| |
|
0 commit comments
Comments
(0)