- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit3fabed0
committed
Correctly handle relcache invalidation corner case during logical decoding.
When using a historic snapshot for logical decoding it can validlyhappen that a relation that's in the relcache isn't visible to thathistoric snapshot. E.g. if a newly created relation is referenced inthe query that uses the SQL interface for logical decoding and asinval reset occurs.The earlier commit that fixed the error handling for that corner casealready improves the situation as a ERROR is better than hitting anassertion... But it's obviously not good enough. So additionallyallow that case without an error if a historic snapshot is set up -that won't allow an invalid entry to stay in the cache because it's a)already marked invalid and will thus be rebuilt during the next accessb) the syscaches will be reset at the end of decoding.There might be prettier solutions to handle this case, but all that wecould think of so far end up being much more complex than this quitesimple fix.This fixes the assertion failures reported by the buildfarm (markhor,tick, leech) after the introduction of new regression tests in89fd41b. The failure there weren't actually directly caused byCLOBBER_CACHE_ALWAYS but the extraordinary long runtimes due to itlead to sinval resets triggering the behaviour.Discussion: 22459.1418656530@sss.pgh.pa.usBackpatch to 9.4 where logical decoding was introduced.1 parent31912d0 commit3fabed0
1 file changed
+12
-0
lines changedLines changed: 12 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2192 | 2192 |
| |
2193 | 2193 |
| |
2194 | 2194 |
| |
| 2195 | + | |
| 2196 | + | |
| 2197 | + | |
| 2198 | + | |
| 2199 | + | |
| 2200 | + | |
| 2201 | + | |
| 2202 | + | |
| 2203 | + | |
| 2204 | + | |
| 2205 | + | |
| 2206 | + | |
2195 | 2207 |
| |
2196 | 2208 |
| |
2197 | 2209 |
| |
|
0 commit comments
Comments
(0)