digoal(at)126(dot)com writes:
> I belive index only scan can return tuple direct, it's not need to scan
> heappage, why it's startup_cost equal to index scan?
> I'ts a bug?
No. Your test case fails to vacuum t11, so although the planner selects
an index-only scan, it's still predicting that all the tuples will require
heap visits to confirm visibility.
The startup cost would not change in any case, since that's about index
descent costs not heap visit costs.
regards, tom lane