forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitded8919
committed
Advance the stop point for multixact offset creation only at checkpoint.
Commitb69bf30 advanced the stop pointat vacuum time, but this has subsequently been shown to be unsafe as aresult of analysis by myself and Thomas Munro and testing by ThomasMunro. The crux of the problem is that the SLRU deletion logic mayget confused about what to remove if, at exactly the right time duringthe checkpoint process, the head of the SLRU crosses what used to bethe tail.This patch, by me, fixes the problem by advancing the stop point onlyfollowing a checkpoint. This has the additional advantage of makingthe removal logic work during recovery more like the way it works duringnormal running, which is probably good.At least one of the calls to DetermineSafeOldestOffset which this patchremoves was already dead, because MultiXactAdvanceOldest is called onlyduring recovery and DetermineSafeOldestOffset was set up to do nothingduring recovery. That, however, is inconsistent with the principle thatrecovery and normal running should work similarly, and was confusing toboot.Along the way, fix some comments that previous patches in this areaneglected to update. It's not clear to me whether there's anyconcrete basis for the decision to use only half of the multixact IDspace, but it's neither necessary nor sufficient to prevent multixactmember wraparound, so the comments should not say otherwise.1 parent7b3f0f8 commitded8919
1 file changed
+17
-26
lines changedLines changed: 17 additions & 26 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2062 | 2062 |
| |
2063 | 2063 |
| |
2064 | 2064 |
| |
2065 |
| - | |
2066 |
| - | |
2067 | 2065 |
| |
2068 | 2066 |
| |
2069 | 2067 |
| |
| |||
2167 | 2165 |
| |
2168 | 2166 |
| |
2169 | 2167 |
| |
2170 |
| - | |
2171 |
| - | |
2172 |
| - | |
2173 |
| - | |
2174 |
| - | |
2175 |
| - | |
2176 |
| - | |
| 2168 | + | |
| 2169 | + | |
| 2170 | + | |
| 2171 | + | |
| 2172 | + | |
2177 | 2173 |
| |
2178 | 2174 |
| |
2179 | 2175 |
| |
| |||
2228 | 2224 |
| |
2229 | 2225 |
| |
2230 | 2226 |
| |
2231 |
| - | |
2232 |
| - | |
2233 | 2227 |
| |
2234 | 2228 |
| |
2235 | 2229 |
| |
| |||
2324 | 2318 |
| |
2325 | 2319 |
| |
2326 | 2320 |
| |
2327 |
| - | |
2328 |
| - | |
2329 | 2321 |
| |
2330 | 2322 |
| |
2331 | 2323 |
| |
| |||
2503 | 2495 |
| |
2504 | 2496 |
| |
2505 | 2497 |
| |
2506 |
| - | |
2507 |
| - | |
2508 |
| - | |
2509 |
| - | |
2510 |
| - | |
2511 |
| - | |
2512 |
| - | |
2513 |
| - | |
2514 |
| - | |
2515 |
| - | |
2516 |
| - | |
2517 |
| - | |
2518 |
| - | |
| 2498 | + | |
| 2499 | + | |
| 2500 | + | |
| 2501 | + | |
| 2502 | + | |
2519 | 2503 |
| |
2520 | 2504 |
| |
2521 | 2505 |
| |
| |||
2852 | 2836 |
| |
2853 | 2837 |
| |
2854 | 2838 |
| |
| 2839 | + | |
| 2840 | + | |
| 2841 | + | |
| 2842 | + | |
| 2843 | + | |
| 2844 | + | |
| 2845 | + | |
2855 | 2846 |
| |
2856 | 2847 |
| |
2857 | 2848 |
| |
|
0 commit comments
Comments
(0)