On Thu, 22 Jul 2021 at 01:54, David Rowley <dgrowleyml@gmail.com> wrote:
> Maybe the planner would need to be involved in making the decision of
> if the bitmap index scan should tuck away a carbon copy of the
> resulting TIDBitmap after the first scan. That way on rescan we could
> just make a copy of the cached version and return that. That saves
> having to modify the callers to tell them not to damage the returned
> TIDBitmap.
Oh but, meh. Caching could blow out work_mem... We might end up using
work_mem * 2.
David