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

From Tom Lane
Subject Re: ERROR: found unexpected null value in index
Date
Msg-id 8251.1562726821@sss.pgh.pa.us
Whole thread Raw
In response to Re: ERROR: found unexpected null value in index  (Peter Geoghegan <pg@bowt.ie>)
Responses Re: ERROR: found unexpected null value in index  (Peter Geoghegan <pg@bowt.ie>)
List pgsql-bugs
Peter Geoghegan <pg@bowt.ie> writes:
> I think that the issue is related to a broken HOT chain -- the index
> doesn't even have any NULL key values, since the CREATE INDEX came
> after the INSERT that added a NULL value. However, it does have a
> tuple with the key value 'a' that points to the root of a HOT chain
> whose first value for the indexed attribute is NULL. The successor
> tuple's value for the indexed attribute is 'a', as expected (of
> course, this is a normal state that
> IndexBuildHeapScan()/heapam_index_build_range_scan() expect other code
> to deal with).

> 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?

            regards, tom lane



pgsql-bugs by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: ERROR: found unexpected null value in index
Next
From: Peter Geoghegan
Date:
Subject: Re: ERROR: found unexpected null value in index