Fix pg_index per-column vectors to have one entry per key column - #3150
Fix pg_index per-column vectors to have one entry per key column#3150zachmu wants to merge 1 commit into
Conversation
Fixes #3110: pg_index.indoption was hardcoded to a single-element vector regardless of how many columns the index has. It now emits one entry per key column (matching indkey's cardinality). Dolt indexes are always stored ascending and don't record per-column direction, so every entry is 0 (ASC NULLS LAST, the btree default). Also fixes the neighboring per-column vectors and count that had the same bug: - indcollation and indclass were empty vectors; they now contain one zero OID per key column - indnkeyatts was hardcoded to 0; it now equals indnatts (INCLUDE columns aren't supported, so all index columns are key columns)
|
SummaryThe run broadly covered index metadata integrity across single-column, composite, primary, unique, partial, ordinary, and newly created indexes, including identity, column counts, ordering, filtering, and related metadata. It also exercised schema-qualified lookups, joined catalog views, refresh behavior, boundary conditions, and concurrent-read resilience, with the normal and edge-case behaviors generally remaining healthy. Safe to merge — the only failure is a medium-severity, pre-existing concurrency defect involving catalog reads and cache collision handling, and it is not attributable to this PR. The change shows no regressions or new failures, so the unrelated server-panic finding is a flag for later rather than a merge blocker. Tests run by ItoAdditional Findings DetailsThese findings are unrelated to the current changes but were observed during testing. 🟡 Concurrent catalog reads can return no rows
Evidence PackageTip Reply with @itoqa to send us feedback on this test run. |
|
|
@zachmu DOLT
|

Fixes pg_index per-column vectors (indoption, indcollation, indclass) to have one entry per key column, and populates indnkeyatts.
Fixes #3110.