Re: ERROR: found unexpected null value in index - Mailing list pgsql-bugs

From Peter Geoghegan
Subject Re: ERROR: found unexpected null value in index
Date
Msg-id CAH2-Wz=iKggOMg6QU5m5cgJD=sh+iUnQZpQ-171brz0M44DvMA@mail.gmail.com
Whole thread Raw
In response to Re: ERROR: found unexpected null value in index  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: ERROR: found unexpected null value in index  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
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



pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: ERROR: found unexpected null value in index
Next
From: Tom Lane
Date:
Subject: Re: ERROR: found unexpected null value in index