Skip to content

Conversation

@MMeent
Copy link
Contributor

@MMeent MMeent commented Nov 28, 2024

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

See also: neondatabase/neon#9932

@MMeent MMeent force-pushed the MMeent/fix/btree-split-cycle-v17 branch 4 times, most recently from 31f850d to 4d4b647 Compare November 29, 2024 16:16
@MMeent MMeent force-pushed the MMeent/fix/btree-split-cycle-v17 branch from 4d4b647 to c459d51 Compare December 3, 2024 22:55
@MMeent MMeent force-pushed the MMeent/fix/btree-split-cycle-v17 branch from c459d51 to ed38f0b Compare December 6, 2024 23:09
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-v17 branch from ed38f0b to add31fa Compare December 6, 2024 23:39
@MMeent MMeent merged commit 471c449 into REL_17_STABLE_neon Dec 10, 2024
1 check passed
@MMeent MMeent deleted the MMeent/fix/btree-split-cycle-v17 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