#6407·paradedb

index_only_scan regress test intermittently degrades to Index Scan

Author: mithuncyCreated Sep 18, 2026Updated Sep 18, 2026
Labelsbugci/tests

index_only_scan fails intermittently. The planner drops from an Index Only Scan to a plain Index Scan and the expected output no longer matches.

bash
cd pg_search
cargo pgrx regress pg18 index_only_scan

On main at 5c125181a this failed once in six runs locally. The PG 18 pgrx job has hit it once in CI. The nightly has not hit it in twelve runs.

-  Index Only Scan using index_only_anchor_idx on index_only_anchor
+  Index Scan using index_only_anchor_idx on index_only_anchor

The table varies per run. index_only_scan, index_only_anchor, index_only_full_scan, index_only_max_keys, and index_only_uuid have all been seen degrading, so each occurrence looks like a different bug.

An Index Only Scan requires all-visible heap pages. Every fixture in the file establishes that with VACUUM (FREEZE, ANALYZE) after a plain INSERT, which only succeeds when no other transaction holds an older xmin horizon. What holds it is not identified: probing pg_stat_activity for other backends with a backend_xmin returned zero across eight runs, but none of those runs flaked.