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 (<[EMAIL PROTECTED]>) "Hay quien adquiere la mala costumbre de ser infeliz" (M. A. Evans) ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly