Description
Partial indexes are critical for our customers at scale. Covering indexing is also critical.
We can improve the planner as follows: if the query predicate is a subset of the index filter, do not include the query predicate's expressions when deciding if the index covers the query.
For example, this query should use ip as a covering index:
create index ip on default(a, b) where y = 1 and z <= 2;
explain select a, b from default where a > 0 and b >= 7 and y = 1 and z <= 2;