-
Notifications
You must be signed in to change notification settings - Fork 463
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 forced FPIs #9932
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Nov 28, 2024
7073 tests run: 6758 passed, 0 failed, 315 skipped (full report)Flaky tests (4)Postgres 17
Postgres 15
Postgres 14
Code coverage* (full report)
* collected from Rust tests only The comment gets automatically updated with the latest test results
6fc0edc at 2024-12-10T16:25:11.216Z :recycle: |
MMeent
force-pushed
the
MMeent/fix/btree-split-cycleid
branch
4 times, most recently
from
November 29, 2024 16:17
27d46ea
to
b1e3d58
Compare
A test case would be nice |
MMeent
force-pushed
the
MMeent/fix/btree-split-cycleid
branch
2 times, most recently
from
December 6, 2024 23:09
69a1210
to
255c894
Compare
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 #9929
MMeent
force-pushed
the
MMeent/fix/btree-split-cycleid
branch
from
December 6, 2024 23:30
255c894
to
1b29d9a
Compare
We need the cycle IDs, so make sure they're adequately logged, with a test case.
MMeent
force-pushed
the
MMeent/fix/btree-split-cycleid
branch
from
December 6, 2024 23:35
1b29d9a
to
c8ab1d1
Compare
@hlinnaka I've added a test case that excercises the issue. It also discovered an issue in the PG patch, which I've fixed yesterday. I think this is now good to go. |
hlinnaka
approved these changes
Dec 10, 2024
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 #9929
MMeent
force-pushed
the
MMeent/fix/btree-split-cycleid
branch
from
December 10, 2024 15:15
332ecd9
to
6fc0edc
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes #9929.
Postgres repo PRS:
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.