Re: Vacuumdb error

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Gipsz Jakab <clausewitz45(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Vacuumdb error
Date: 2011-04-14 16:25:05
Message-ID: 15576.1302798305@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Gipsz Jakab <clausewitz45(at)gmail(dot)com> writes:
> Today morning at 01:00 AM in our PostgreSQL 9.0.3 server a routine
> maintenance script has started (vacuumdb --all --full --analyze), and
> stopped with this error:

> sqlstate=23505ERROR: duplicate key value violates unique constraint
> "pg_index_indexrelid_index"
> sqlstate=23505DETAIL: Key (indexrelid)=(2678) already exists.

Maybe you had better show us *all* of your "routine maintenance" steps,
because there are some fairly unexplainable things in that pg_index dump.
VACUUM FULL alone wouldn't have resulted in the pg_index and pg_class
indexes' entries having updated xmins:

> "(1,40)";"48741";"0";2678;2610;1;false;false;true;false;true;false;true
> "(1,41)";"48741";"0";2679;2610;1;true;false;true;false;true;true;true
> "(1,42)";"49791";"0";2662;1259;1;true;false;true;false;true;true;true
> "(1,43)";"49791";"0";2663;1259;2;true;false;true;false;true;true;true

and I'm wondering how come three of them have indcheckxmin true too.
I think you must be whacking the system catalogs around harder than
you've admitted to.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Carl von Clausewitz 2011-04-14 16:36:55 Re: Vacuumdb error
Previous Message Alan Hodgson 2011-04-14 16:08:27 Re: pgsql 9.0.1 table corruption