forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit03c46e1
committed
Fix handling of orphaned 2PC files in the future at recovery
Before728bd99, that has improved the support for 2PC files duringrecovery, the initial logic scanning files in pg_twophase was done so asfiles in the future of the transaction ID horizon were checked first,followed by a check if a transaction ID is aborted or committed whichcould involve a pg_xact lookup. After this commit, these checks havebeen done in reverse order.Files detected as in the future do not have a state that can be checkedin pg_xact, hence this caused recovery to fail abruptly should anorphaned 2PC file in the future of the transaction ID horizon exist inpg_twophase at the beginning of recovery.A test is added to check for this scenario, using an empty 2PC with atransaction ID large enough to be in the future when running the test.This test is added in 16 and older versions for now. 17 and newerversions are impacted by a second bug caused by the addition of theepoch in the 2PC file names. An equivalent test will be added in thesebranches in a follow-up commit, once the second set of issues reportedare fixed.Author: Vitaly Davydov, Michael PaquierDiscussion:https://postgr.es/m/11e597-676ab680-8d-374f23c0@145466129Backpatch-through: 131 parent15b4c46 commit03c46e1
1 file changed
+8
-8
lines changedLines changed: 8 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2207 | 2207 |
| |
2208 | 2208 |
| |
2209 | 2209 |
| |
2210 |
| - | |
2211 |
| - | |
| 2210 | + | |
| 2211 | + | |
2212 | 2212 |
| |
2213 | 2213 |
| |
2214 | 2214 |
| |
2215 | 2215 |
| |
2216 |
| - | |
| 2216 | + | |
2217 | 2217 |
| |
2218 | 2218 |
| |
2219 | 2219 |
| |
2220 | 2220 |
| |
2221 | 2221 |
| |
2222 | 2222 |
| |
2223 |
| - | |
| 2223 | + | |
2224 | 2224 |
| |
2225 | 2225 |
| |
2226 | 2226 |
| |
2227 | 2227 |
| |
2228 | 2228 |
| |
2229 | 2229 |
| |
2230 |
| - | |
2231 |
| - | |
| 2230 | + | |
| 2231 | + | |
2232 | 2232 |
| |
2233 | 2233 |
| |
2234 | 2234 |
| |
2235 | 2235 |
| |
2236 |
| - | |
| 2236 | + | |
2237 | 2237 |
| |
2238 | 2238 |
| |
2239 | 2239 |
| |
2240 | 2240 |
| |
2241 | 2241 |
| |
2242 | 2242 |
| |
2243 |
| - | |
| 2243 | + | |
2244 | 2244 |
| |
2245 | 2245 |
| |
2246 | 2246 |
| |
|
0 commit comments
Comments
(0)