forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitc34787f
committed
Harden nbtree page deletion.
Add some additional defensive checks in the second phase of indexdeletion to detect and report index corruption during VACUUM, and toavoid having VACUUM become stuck in more cases. The code is still notrobust in the presence of a circular chain of sibling links, though it'snot clear whether that really matters. This is follow-up work to commit3a01f68.The new defensive checks rely on the assumption that there can be nomore than one VACUUM operation running for an index at any given time.Remove an old comment suggesting that multiple concurrent VACUUMs needto be considered here. This concern now seems highly unlikely to haveany real validity, since we clearly rely on the same assumption inseveral other places. For example, there are much more recent commentsthat appear in the same function (added by commitefada2b) that makethe same assumption.Also add a CHECK_FOR_INTERRUPTS() to the relevant code path. Contraryto comments added by commit3a01f68, it is actually possible to handleinterrupts here, at least in the common case where processing takesplace at the leaf level. We only hold a pin on leafbuf/target page whenstepping right at the leaf level.No backpatch due to the lack of complaints following hardening added tothe same area by commit3a01f68.1 parent2f86ab3 commitc34787f
1 file changed
+38
-26
lines changedLines changed: 38 additions & 26 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1978 | 1978 |
| |
1979 | 1979 |
| |
1980 | 1980 |
| |
1981 |
| - | |
1982 |
| - | |
1983 |
| - | |
1984 | 1981 |
| |
1985 | 1982 |
| |
1986 | 1983 |
| |
| |||
1991 | 1988 |
| |
1992 | 1989 |
| |
1993 | 1990 |
| |
1994 |
| - | |
| 1991 | + | |
| 1992 | + | |
| 1993 | + | |
| 1994 | + | |
| 1995 | + | |
| 1996 | + | |
| 1997 | + | |
| 1998 | + | |
| 1999 | + | |
1995 | 2000 |
| |
1996 | 2001 |
| |
1997 | 2002 |
| |
| |||
2355 | 2360 |
| |
2356 | 2361 |
| |
2357 | 2362 |
| |
2358 |
| - | |
2359 |
| - | |
2360 |
| - | |
2361 |
| - | |
2362 |
| - | |
| 2363 | + | |
2363 | 2364 |
| |
2364 | 2365 |
| |
2365 | 2366 |
| |
| |||
2370 | 2371 |
| |
2371 | 2372 |
| |
2372 | 2373 |
| |
2373 |
| - | |
2374 |
| - | |
2375 |
| - | |
| 2374 | + | |
2376 | 2375 |
| |
2377 | 2376 |
| |
2378 |
| - | |
2379 |
| - | |
2380 |
| - | |
2381 |
| - | |
| 2377 | + | |
| 2378 | + | |
| 2379 | + | |
| 2380 | + | |
| 2381 | + | |
| 2382 | + | |
| 2383 | + | |
2382 | 2384 |
| |
| 2385 | + | |
| 2386 | + | |
| 2387 | + | |
| 2388 | + | |
| 2389 | + | |
| 2390 | + | |
2383 | 2391 |
| |
2384 |
| - | |
| 2392 | + | |
2385 | 2393 |
| |
2386 |
| - | |
2387 |
| - | |
2388 |
| - | |
2389 |
| - | |
2390 | 2394 |
| |
2391 | 2395 |
| |
2392 | 2396 |
| |
| |||
2398 | 2402 |
| |
2399 | 2403 |
| |
2400 | 2404 |
| |
| 2405 | + | |
| 2406 | + | |
| 2407 | + | |
| 2408 | + | |
| 2409 | + | |
| 2410 | + | |
| 2411 | + | |
| 2412 | + | |
2401 | 2413 |
| |
2402 | 2414 |
| |
| 2415 | + | |
| 2416 | + | |
| 2417 | + | |
| 2418 | + | |
2403 | 2419 |
| |
2404 | 2420 |
| |
2405 | 2421 |
| |
| |||
2408 | 2424 |
| |
2409 | 2425 |
| |
2410 | 2426 |
| |
2411 |
| - | |
2412 |
| - | |
2413 |
| - | |
2414 |
| - | |
2415 |
| - | |
| 2427 | + | |
2416 | 2428 |
| |
2417 | 2429 |
| |
2418 | 2430 |
| |
|
0 commit comments
Comments
(0)