Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[PGPRO-11599] Fix wrong results returned when order_by_attach=TRUE. #164

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

Open
arseny114 wants to merge 10 commits into postgrespro:master
base: master
Choose a base branch
Loading
from arseny114:PGPRO-11599_bitmap

Conversation

@arseny114
Copy link
Contributor

@arseny114 arseny114 commented Oct 2, 2025

With order_by_attach=TRUE, the RUM index arranges the entries in the posting lists (for keys that have additional information) in order of sorting by additional information. For the remaining keys, the records are sorted by tid. The scanGetItemRegular() function assumes that all posting lists have the same sorting, so it was not suitable for sorting in this case.

In order to fix this, the appropriate TIDs for keys that are ordered by tid are assembled in advance into a bitmap. For keys ordered in an alternative order, a routine scan is performed, after which the appropriate tid is checked in the bitmap.

Tags: rum

michaelwu0505 reacted with thumbs up emoji
Copy link
Contributor

Note: #79

michaelwu0505 reacted with thumbs up emoji

@arseny114 arseny114 force-pushed the PGPRO-11599_bitmap branch 5 times, most recently from ff67b6f to c19a6d4 Compare October 13, 2025 07:49
Arseny Kositsyn added 8 commits October 27, 2025 11:43
Static functions from TIDBitmap were added to RUM as RumTIDBitmap.
A function has been added to search for tid inside RumTIDBitmap.
Tags: rum
With order_by_attach=TRUE, the RUM index arranges the entries in the posting
lists (for keys that have additional information) in order of sorting by
additional information. For the remaining keys, the records are sorted by tid.
The scanGetItemRegular() function assumes that all posting lists have the same
sorting, so it was not suitable for sorting in this case.
In order to fix this, the appropriate TIDs for keys that are ordered by tid are
assembled in advance into a bitmap. For keys ordered in an alternative order, a
routine scan is performed, after which the appropriate tid is checked in the
bitmap.
Tags: rum
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /