Re: Vacuumdb error

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Carl von Clausewitz <clausewitz45(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Vacuumdb error
Date: 2011-04-15 20:33:30
Message-ID: 426.1302899610@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Carl von Clausewitz <clausewitz45(at)gmail(dot)com> writes:
>>> sqlstate=23505ERROR: duplicate key value violates unique constraint
>>> "pg_index_indexrelid_index"
>>> sqlstate=23505DETAIL: Key (indexrelid)=(2678) already exists.

After a considerable amount of fooling around I've been able to
reproduce this and identify the cause:
http://archives.postgresql.org/pgsql-hackers/2011-04/msg00777.php

A real fix will be forthcoming in the next update releases (not Monday's
updates, unfortunately; too late for that). In the meantime, it appears
that the problem can only be triggered by a sequence that involves
*both* REINDEX and VACUUM FULL on pg_index. Since, as I mentioned
before, a separate reindex step is completely useless when using 9.0's
VACUUM FULL, removing the reindex step from your maintenance script
should be an adequate workaround.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Basil Bourque 2011-04-15 22:29:28 Can a nested function determine it is being called within a trigger?
Previous Message Edison So 2011-04-15 20:15:44 Help: pg_restore failure