-
Notifications
You must be signed in to change notification settings - Fork 360
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
pageserver: fix unlogged relations with sharding #7454
Merged
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
jcsp
added
t/bug
Issue Type: Bug
c/storage/pageserver
Component: storage: pageserver
labels
Apr 22, 2024
koivunej
approved these changes
Apr 22, 2024
Merged
2772 tests run: 2654 passed, 0 failed, 118 skipped (full report)Code coverage* (full report)
* collected from Rust tests only The comment gets automatically updated with the latest test results
e55cdbb at 2024-04-22T11:54:47.808Z :recycle: |
Pushed a change to how the workaround for existing broken tenants works: we can't directly know whether a given relation is problematic, we have to try reading it and ignore the error if it's a key that could have this issue. This works with the real life example data we have. |
koivunej
pushed a commit
that referenced
this pull request
Apr 22, 2024
## Problem - #7451 INIT_FORKNUM blocks must be stored on shard 0 to enable including them in basebackup. This issue can be missed in simple tests because creating an unlogged table isn't sufficient -- to repro I had to create an _index_ on an unlogged table (then restart the endpoint). Closes: #7451 ## Summary of changes - Add a reproducer for the issue. - Tweak the condition for `key_is_shard0` to include anything that isn't a normal relation block _and_ any normal relation block whose forknum is INIT_FORKNUM. - To enable existing databases to recover from the issue, add a special case that omits relations if they were stored on the wrong INITFORK. This enables postgres to start and the user to drop the table and recreate it.
jcsp
added a commit
that referenced
this pull request
Apr 29, 2024
5 tasks
jcsp
added a commit
that referenced
this pull request
Apr 30, 2024
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.
Problem
INIT_FORKNUM blocks must be stored on shard 0 to enable including them in basebackup.
This issue can be missed in simple tests because creating an unlogged table isn't sufficient -- to repro I had to create an index on an unlogged table (then restart the endpoint).
Closes: #7451
Summary of changes
key_is_shard0
to include anything that isn't a normal relation block and any normal relation block whose forknum is INIT_FORKNUM.Checklist before requesting a review
Checklist before merging