Repository navigation
Use the pfor posting list codec for text indexes by default - #127489
Conversation
Change the default of the MergeTree setting `text_index_posting_list_codec` from `none` to `pfor`. The settings history entry for 26.10 makes `compatibility` below 26.10 revert it to `none`, so a compatibility pin keeps upgraded servers writing parts that older servers can read. Adjust tests that relied on `none` being the default: - `02346_text_index_posting_list_compression_data_size_validation`: pin `posting_list_codec = 'none'` for the uncompressed table. - `04355_text_index_table_settings`: use `none` as the non-default codec and `pfor` as the default one. - `test_text_index_upgrade`: pin the codec to `none` together with `v0_initial` before the downgrade, and rely on the default codec in the `pfor` downgrade test. Update the documentation and stale comments accordingly. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Preview approval requiredThis pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit |
|
Workflow [PR], commit [74fc94c] AI ReviewSummarySwitches the default text-index posting list codec to Findings❌ Blockers
Final VerdictStatus: ❌ Block. Fix the single-segment count regression or retain the previous default, then rerun |
The `settings_changes_history` style check requires a changed default to have a record under the current master version, which is 26.11 now. Move the `text_index_posting_list_codec` record from 26.10 to 26.11 and update the documentation accordingly. https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=127489&sha=3b3fa3fbf121ffba37ee621d06ceff4cb2e2dbdc&name_0=PR&name_1=Style%20check ClickHouse#127489 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Split the dense paragraph about the posting list codec into short ones: `text_index_serialization_version` does not control the codec, `pfor` parts cannot be read before 26.10, and `pfor` is the default since 26.11, which a `compatibility` pin below 26.11 reverts to `none` during a rolling upgrade. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Compile time of recompiled translation units7 translation units recompiled, 17 s compile time in total, 7 of them have a recent master baseline. |
Add a `tab_pfor` table to `02346_text_index_posting_list_compression_data_size_validation`, so the exact text index size is pinned for `pfor` next to `bitpacking` and `none`, on the same dataset with its 128-value block edge cases. `05060_text_index_posting_list_codec_size` only checks the size ordering. Review comment: ClickHouse#127489 (comment) Co-Authored-By: Claude Opus 5.5 <[email protected]>
0f8ede7
#127489 changed the default of `text_index_posting_list_codec` to `pfor`. The compressed postings take fewer page cache blocks, so the default query had only 83 page cache misses and the `misses >= 100` assertion failed in the merge queue. The test is about the lookahead, not the codec, so keep the postings uncompressed. CI report: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?REF=gh-readonly-queue/master/pr-125770-3b3f22da1d188310dfaf55af6b993fa8477e7bf4&sha=6ba1096d6fd295909fd5b518f171b6578c0ec2dc&name_0=MergeQueueCI PR: #125770 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…roximate dense ones The analysis decoded single-segment `pfor` and `bitpacking` posting lists into a Roaring bitmap before folding them, which made `pfor` much slower than `none` on dense lists (perf test `text_index_trivial_count`, queries #2 and #3). - `FoldedPostings`: the rows of block-compressed posting lists are decoded straight into sorted arrays, no bitmap is built. An intersection is a sorted array, intersected with a compressed posting list without decoding the blocks with none of its rows. A union is kept as its largest array and the merged other arrays, so the rows of a dense list are not copied: its cardinality is counted from both, and the lazy readers take a cursor per array. - `approximatePostings`: a dense posting list of an `Any` or single-token query is approximated by the row spans of its packed blocks. The last row of a block is a row of the posting list, so only a block whose span holds a whole mark needs decoding, and the approximation is exact at the granularity of marks. The readers read such posting lists themselves with cursors, so it is used only in the lazy mode without patterns, and not by `ReadFromTextIndexCount`. - New event `TextIndexAnalysisApproximatedPostings`, test 05616. Related: ClickHouse#127489 (comment) Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@CurtizJ @ahmadov — this PR looks backward incompatible but is categorized as Why: Suggested category: |

Related: #118123
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Text indexes now use the
pforposting list codec by default (MergeTree settingtext_index_posting_list_codec), which makes them smaller and enables lazy posting list decoding. Parts written withpforcannot be read by servers older than 26.10; setcompatibilityto an older version during a rolling upgrade to keep writing uncompressed posting lists.Workflow [PR]
Sync PR [sync-upstream/pr/127489]
Version info
26.11.1.1105-master(included in26.11and later)