On Thu, Jul 11, 2019 at 2:20 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> As far as I can tell, no special finagling is needed: if we just use
> the regular index-only-scan logic then this all works the way we want,
> and it's actually better than before because we get to skip heap visits
> altogether when dealing with unchanging data. Attached is a patch
> against HEAD that seems to do all the right things.
Interesting approach. I certainly prefer it to the alternative
approach of framing the problem as a visibility concern.
> I'm a little dissatisfied with the fact that I had to duplicate the
> all-visible checking logic out of nodeIndexonlyscan.c. Maybe we should
> think about refactoring to avoid multiple copies of that? But that's
> probably a task for a separate patch, if it's practical at all.
I suspect that you'd end up writing more code than you'd save if you
generalized what we already have. Not clear that that's worth it.
--
Peter Geoghegan