Don't try to fix eliminated nbtree array scan keys.
Peter Geoghegan <pg@bowt.ie>
Don't try to fix eliminated nbtree array scan keys. Preprocessing for nbtree index scans allowed array "input" scan keys already marked eliminated during array-specific preprocessing to be "fixed up" during preprocessing proper. This allowed eliminated scan keys on DESC index columns to spurious have their strategy commuted, causing assertion failures. To fix, teach _bt_fix_scankey_strategy to ignore these scan keys. This brings it in line with its only caller, _bt_preprocess_keys. Oversight in commit 5bf748b8, which enhanced nbtree ScalarArrayOp execution. Reported-By: Donghang Lin <donghanglin@gmail.com> Discussion: https://postgr.es/m/CAA=D8a2sHK6CAzZ=0CeafC-Y-MFXbYxnRSHvZTi=+JHu6kAa8Q@mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/nbtree/nbtutils.c | modified | +7 −0 |
Discussion
- Optimizing nbtree ScalarArrayOp execution, allowing multi-column ordered scans, skip scan 78 messages · 2023-07-25 → 2024-08-26