Fix a bunch of bad interactions between partial indexes and the new
Tom Lane <tgl@sss.pgh.pa.us>
Fix a bunch of bad interactions between partial indexes and the new planning logic for bitmap indexscans. Partial indexes create corner cases in which a scan might be done with no explicit index qual conditions, and the code wasn't handling those cases nicely. Also be a little tenser about eliminating redundant clauses in the generated plan. Per report from Dmitry Karasik.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/nodes/list.c | modified | +155 −5 |
| src/backend/optimizer/path/indxpath.c | modified | +73 −37 |
| src/backend/optimizer/path/orindxpath.c | modified | +15 −5 |
| src/backend/optimizer/plan/createplan.c | modified | +59 −11 |
| src/backend/optimizer/plan/planagg.c | modified | +4 −2 |
| src/backend/optimizer/util/restrictinfo.c | modified | +76 −18 |
| src/include/nodes/pg_list.h | modified | +11 −1 |
| src/include/optimizer/paths.h | modified | +3 −2 |
| src/include/optimizer/restrictinfo.h | modified | +3 −2 |