Re: ERROR: found unexpected null value in index

Peter Geoghegan <pg@bowt.ie>

From: Peter Geoghegan <pg@bowt.ie>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Manuel Rigger <rigger.manuel@gmail.com>, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Date: 2019-07-10T03:06:50Z
Lists: pgsql-bugs
On Tue, Jul 9, 2019 at 7:47 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > Back when get_actual_variable_range() used a dirty snapshot, it would
> > have not seen any NULL value with this test case, because the root of
> > the HOT chain would be considered recently dead.
>
> Hm.  So maybe we need to teach it to ignore tuples that are not the tips
> of their HOT chains?

An approach like that was the first thing that I thought of, but I'll
have to study the problem some more before coming up with a firm
opinion.


-- 
Peter Geoghegan



Commits

  1. Fix get_actual_variable_range() to cope with broken HOT chains.

  2. Improve performance of get_actual_variable_range with recently-dead tuples.