"Qingqing Zhou" <zhouqq@cs.toronto.edu> writes:
> As I read, the kill_prior_tuple optimization doesn't work for bitmap scan
> code. To fix this problem, we have two choices.
> One is still use the kill_prior_tuple trick in a modified way. Heap TIDs
> recycling should not be a problem. This is because generally we always hold
> pin of the last index page we scanned,
Really? An indexscan will release pin before returning no-more-tuples,
and had better do so else we leak pins during queries involving many
indexscans. (IIRC, I broke that around 7.3 :-()
> Another smaller problem is that we have
> to scan the heap pages again to identify the index pointers, but that's
> affordable since these pages should be in the buffer pool with big chance.
Not sure I believe that either. Even granting the assumption that the
pages are still in cache, this implies a big increase in bufmgr traffic.
This certainly is an interesting problem, but there is not a simple
solution.
regards, tom lane