Re: ERROR: found unexpected null value in index

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: ERROR: found unexpected null value in index
Дата
Msg-id 21234.1562801346@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: ERROR: found unexpected null value in index  (Peter Geoghegan <pg@bowt.ie>)
Ответы Re: ERROR: found unexpected null value in index  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
Peter Geoghegan <pg@bowt.ie> writes:
> On Wed, Jul 10, 2019 at 3:26 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> I was imagining it would still check the heap, if necessary, to verify
>> that it'd found a tuple passing the given snapshot.

> Not sure I follow. When or how would it not be necessary? Are you
> merely referring to the simple case where the LP_DEAD bit is already
> set for the item on the B-Tree leaf page?

Index-only scans already have the LP_DEAD fast path (don't return value)
and the all_visible fast path (always return value), and otherwise they
do a heap visit.  If we can use a custom visibility test in the heap
visit and not muck up the opportunity to set LP_DEAD when relevant, then
it seems like using the IOS code path will do exactly what we want.
Otherwise some finagling might be necessary.  But it still might be
cleaner than directly looking at HOT-update status.

I'll take a look at that tomorrow if nobody beats me to it.

            regards, tom lane



В списке pgsql-bugs по дате отправления:

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: ERROR: found unexpected null value in index
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: BUG #15888: Bogus "idle in transaction" state for logicaldecoding client after creating a slot