From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Geoghegan <pg@bowt.ie>
Cc: Manuel Rigger <rigger.manuel@gmail.com>
Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Subject: Re: ERROR: found unexpected null value in index
Date: Tue, 09 Jul 2019 22:47:01 -0400
Message-ID: <8251.1562726821@sss.pgh.pa.us> (raw)
In-Reply-To: <CAH2-Wz=+N+QZ=+ACv3PQ8LqXmsMbfuMviGTYg7X5rwE6xT2L=Q@mail.gmail.com>
References: <CA+u7OA7W4NWEhCvftdV6_8bbm2vgypi5nuxfnSEJQqVKFSUoMg@mail.gmail.com>
<9288.1562720919@sss.pgh.pa.us>
<CAH2-Wzm41rs0Ee=zi-qWQVpgZoZkY4aq8_ZBFCUK+BGJrOo47g@mail.gmail.com>
<20825.1562723034@sss.pgh.pa.us>
<CAH2-Wz=+N+QZ=+ACv3PQ8LqXmsMbfuMviGTYg7X5rwE6xT2L=Q@mail.gmail.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, pg@bowt.ie, rigger.manuel@gmail.com
Subject: Re: ERROR: found unexpected null value in index
In-Reply-To: <8251.1562726821@sss.pgh.pa.us>
References: <CA+u7OA7W4NWEhCvftdV6_8bbm2vgypi5nuxfnSEJQqVKFSUoMg@mail.gmail.com> <9288.1562720919@sss.pgh.pa.us> <CAH2-Wzm41rs0Ee=zi-qWQVpgZoZkY4aq8_ZBFCUK+BGJrOo47g@mail.gmail.com> <20825.1562723034@sss.pgh.pa.us> <CAH2-Wz=+N+QZ=+ACv3PQ8LqXmsMbfuMviGTYg7X5rwE6xT2L=Q@mail.gmail.com> <8251.1562726821@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox