Skip to content

Conversation

@MMeent
Copy link
Contributor

@MMeent MMeent commented Nov 28, 2024

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

See also: neondatabase/neon#9932

@MMeent MMeent force-pushed the MMeent/fix/btree-split-cycle-v15 branch 5 times, most recently from 32f3031 to b21751d Compare December 3, 2024 22:55
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-v15 branch from b21751d to 28e9567 Compare December 6, 2024 23:09
@MMeent MMeent merged commit 8736b10 into REL_15_STABLE_neon Dec 10, 2024
1 check passed
@MMeent MMeent deleted the MMeent/fix/btree-split-cycle-v15 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.

3 participants