-
Notifications
You must be signed in to change notification settings - Fork 23
Check for invalid down link while prefetching B-Tree leave pages for index-only scan #534
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
Conversation
| else if (!BlockNumberIsValid(so->next_parent)) | ||
| elog(FATAL, "btpo_next is invalid"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
opaque->ptpo_next can be P_NONE, but IIUC that is 0, not InvalidBlockNumber. I don't understand how it could be InvalidBlockNumber.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While the check isn't wrong per se, I think this is irrelevant as btpo_prev shouldn't be InvalidBlockNumber, ever.
Same comment on the same addition around line 908-912 - I think both can be reverted.
4fc8da9 to
424b5ba
Compare
MMeent
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is an improvement over the previous version, but seems to have some additions that I'd rather see gone.
| else if (!BlockNumberIsValid(so->next_parent)) | ||
| elog(FATAL, "btpo_next is invalid"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While the check isn't wrong per se, I think this is irrelevant as btpo_prev shouldn't be InvalidBlockNumber, ever.
Same comment on the same addition around line 908-912 - I think both can be reverted.
398fb77 to
9b1bcff
Compare
…index-only scan (#9867) ## Problem See #9866 Index-only scan prefetch implementation doesn't take in account that down link may be invalid ## Summary of changes Check that downlink is valid block number Correspondent Postgres PRs: neondatabase/postgres#534 neondatabase/postgres#535 neondatabase/postgres#536 neondatabase/postgres#537 --------- Co-authored-by: Konstantin Knizhnik <knizhnik@neon.tech>
…index-only scan (#534) * Check for invalid down link while prefetching B-Tree leave pages for index-only scan * Replace assert which doesn't take in account presence of invalid downlinks * Replace assert which doesn't take in account presence of invalid downlinks * Add extra checks for IOS prefetch * Do not use stack->bts_offset because content of parent page can be changed * Remove unintended changes --------- Co-authored-by: Konstantin Knizhnik <knizhnik@neon.tech>
…index-only scan (#534) * Check for invalid down link while prefetching B-Tree leave pages for index-only scan * Replace assert which doesn't take in account presence of invalid downlinks * Replace assert which doesn't take in account presence of invalid downlinks * Add extra checks for IOS prefetch * Do not use stack->bts_offset because content of parent page can be changed * Remove unintended changes --------- Co-authored-by: Konstantin Knizhnik <knizhnik@neon.tech>
No description provided.