Tom Lane wrote:
> Greg Stark <greg.stark@enterprisedb.com> writes:
>> If we do this though it would be really nice to do it at a higher
>> level than the indexam. If we could do it for any indexam that
>> provides a kind of bulk insert method that would be great.
>
>> I'm just not sure how to support all the indexable operators for the
>> various indexams on the local buffered list.
>
> In principle, just return all those TIDs marked "lossy, please recheck".
> This is a bit brute-force but I'm not sure any useful optimization is
> possible.
You could flush the local buffer to the index whenever the index is
queried. Not sure if it's better than returning them for recheck, though.
This wouldn't work for unique indexes, BTW, but that's not a problem for
GIN.
-- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com