Heikki Linnakangas <heikki@enterprisedb.com> writes:
> Tom Lane wrote:
>> This will not work, unless we change the planner --- the original quals
>> aren't necessarily there in some corner cases (partial indexes, if
>> memory serves).
> This is only for bitmap scans, which *do* always have the original quals
> available in the executor (BitmapHeapScanState.bitmapqualorig).
> That's because we have to recheck the original conditions when the
> bitmap goes lossy.
Yeah, but the index AM has to support regular indexscans too, and those
are not prepared for runtime lossiness determination; nor am I
particularly willing to add that.
> With the unapplied GIT patch, the index doesn't store the index key of
> every tuple.
I thought the design was to eliminate *duplicate* keys from the index.
Not to lose data.
regards, tom lane