Re: Failed to re-find parent key

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Failed to re-find parent key
Дата
Msg-id 20050322145713.GA32038@dcc.uchile.cl
обсуждение исходный текст
Ответ на Failed to re-find parent key  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: Failed to re-find parent key
Список pgsql-hackers
On Tue, Mar 22, 2005 at 12:31:55PM +0100, Peter Eisentraut wrote:
> What does the error message
> 
> failed to re-find parent key in "tablename_pkey"
> 
> mean?  This happens reproducibly during VACUUM on a certain table.

This has been reported before, but no one has been able to reproduce it
(not the VACUUM, but the steps that led the index to that state).  This
is probably a very subtle bug introduced after the page-reusing code was
introduced in nbtree.  I don't think it has been corrected in later
releases.

There are two ocurrences of this error message in the code: one is while
trying to split a page, inserting the pointer to the new page in its
parent.  This one is not what you are seeing, because during vacuum no
splitting takes place.

The other ocurrence is at the first pass of page recovery, which happens
at VACUUM.  The code tries to find the parent page to delete the pointer
that leads to the page being unlinked; if it can't find said pointer,
the error you see is issued.  I think it takes a lot of concurrency for
the situation to arise.

> Would REINDEX fix it?  Anything else we should check?

Maybe you could see exactly what page is causing the problem,
pg_filedump it, and see what's the exact problem.  Yes, a REINDEX fixes
it (at least it did in Gaetano's case.)

-- 
Alvaro Herrera (<alvherre[@]dcc.uchile.cl>)
"Hay quien adquiere la mala costumbre de ser infeliz" (M. A. Evans)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Failed to re-find parent key
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Failed to re-find parent key