Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emit nbtree vacuum cycle id in nbtree xlog through FPIs #541

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

MMeent
Copy link

@MMeent MMeent commented Nov 28, 2024

This fixes the PostgreSQL v14 side of neondatabase/neon#9929.

See also: neondatabase/neon#9932

@MMeent MMeent force-pushed the MMeent/fix/btree-split-cycle-v14 branch 3 times, most recently from 5d44f74 to fcb0730 Compare December 3, 2024 22:56
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
@MMeent MMeent force-pushed the MMeent/fix/btree-split-cycle-v14 branch from fcb0730 to d3a2380 Compare December 6, 2024 23:09
@MMeent MMeent merged commit 13ff324 into REL_14_STABLE_neon Dec 10, 2024
1 check passed
@MMeent MMeent deleted the MMeent/fix/btree-split-cycle-v14 branch December 10, 2024 15:12
github-merge-queue bot pushed a commit to neondatabase/neon that referenced this pull request Dec 10, 2024
This fixes #9929.

## Postgres repo PRS:
- PG17: neondatabase/postgres#538
- PG16: neondatabase/postgres#539
- PG15: neondatabase/postgres#540
- PG14: neondatabase/postgres#541

## Problem
see #9929 

## Summary of changes

We update the split code to force the code to emit an FPI whenever the
cycle ID might be interesting for concurrent btree vacuum.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants