Commit 1b558ed
Emit nbtree vacuum cycle id in nbtree xlog through FPIs
NBTree needs a vacuum cycle ID on pages of whom the split resulted in a new
right page that is located before the original page, or who were split from
such split pages in the current vacuum cycle. By WAL-logging the cycle_id
and restoring it in recovery, we assure vacuum doesn't fail to clean up the
earlier pages.
During recovery, we extract the cycle ID from the original page if this page
had an FPI, either directly (when the page was restored) or indirectly (from
the record data).
This fixes neondatabase/neon#9929
(Cherry-picked to v18 from v17 by Heikki. Not sure why this was
missing. Fixes test_nbtree_pagesplit_cycleid)1 parent 1c44e35 commit 1b558ed
2 files changed
+94
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1494 | 1494 | | |
1495 | 1495 | | |
1496 | 1496 | | |
| 1497 | + | |
1497 | 1498 | | |
1498 | 1499 | | |
1499 | 1500 | | |
| |||
1514 | 1515 | | |
1515 | 1516 | | |
1516 | 1517 | | |
| 1518 | + | |
| 1519 | + | |
1517 | 1520 | | |
1518 | 1521 | | |
1519 | 1522 | | |
| |||
1969 | 1972 | | |
1970 | 1973 | | |
1971 | 1974 | | |
| 1975 | + | |
1972 | 1976 | | |
1973 | 1977 | | |
1974 | 1978 | | |
| |||
1981 | 1985 | | |
1982 | 1986 | | |
1983 | 1987 | | |
1984 | | - | |
| 1988 | + | |
| 1989 | + | |
| 1990 | + | |
| 1991 | + | |
| 1992 | + | |
| 1993 | + | |
| 1994 | + | |
| 1995 | + | |
| 1996 | + | |
| 1997 | + | |
| 1998 | + | |
| 1999 | + | |
| 2000 | + | |
| 2001 | + | |
| 2002 | + | |
| 2003 | + | |
| 2004 | + | |
| 2005 | + | |
| 2006 | + | |
| 2007 | + | |
| 2008 | + | |
1985 | 2009 | | |
1986 | 2010 | | |
1987 | 2011 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
432 | 432 | | |
433 | 433 | | |
434 | 434 | | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
435 | 504 | | |
436 | 505 | | |
437 | 506 | | |
| |||
0 commit comments