Re: vacuum error "left link changed unexpectedly" - Mailing list pgsql-general

From Tom Lane
Subject Re: vacuum error "left link changed unexpectedly"
Date
Msg-id 7539.1123856775@sss.pgh.pa.us
Whole thread Raw
In response to vacuum error "left link changed unexpectedly"  (Ulrich Wisser <ulrich.wisser@relevanttraffic.se>)
Responses Re: vacuum error "left link changed unexpectedly"  (Ulrich Wisser <ulrich.wisser@relevanttraffic.se>)
Re: vacuum error "left link changed unexpectedly"  (Ulrich Wisser <ulrich.wisser@relevanttraffic.se>)
List pgsql-general
Ulrich Wisser <ulrich.wisser@relevanttraffic.se> writes:
> vacuumdb: vacuuming of database "CLIX2" failed: ERROR:  left link
> changed unexpectedly

Hm, is this repeatable?  When I wrote the code I thought it was
a can't-happen case, which is why the error message is so terse
(it was only pure paranoia that made me put in the check at all).
I suppose it must indicate a corrupted index, but I'm not clear
on exactly what the nature of the corruption is.

You might proceed by fixing the error message to be a little more
helpful, say

    if (opaque->btpo_prev != leftsib)
        elog(ERROR, "left link changed unexpectedly in block %u of index %s",
             target, RelationGetRelationName(rel));

(this is in src/backend/access/nbtree/nbtpage.c, about line 863 in
current sources).  Once you know which index has the problem,
I would like to see the output of pg_filedump on that index.
After you've got the dump, a REINDEX should fix it.

BTW, which Postgres version is this exactly?

            regards, tom lane

pgsql-general by date:

Previous
From: "Ronzani Dario"
Date:
Subject: R: Linux Postgres authentication against active directory
Next
From: Peter Fein
Date:
Subject: Re: No PUBLIC access by default?