Re: major database breakdown

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ulrich Wisser <ulrich(dot)wisser(at)relevanttraffic(dot)se>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: major database breakdown
Date: 2004-08-16 15:23:27
Message-ID: 13810.1092669807@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ulrich Wisser <ulrich(dot)wisser(at)relevanttraffic(dot)se> writes:
> backend> REINDEX DATABASE "CLIX1"
> NOTICE: relation 16416 was reindexed
> NOTICE: relation 1255 was reindexed
> ...
> NOTICE: relation 16384 was reindexed
> NOTICE: relation 16386 was reindexed
> ERROR: Cannot create unique index. Table contains non-unique values
> backend>

> Which relation is that? How can I find that relation?

I think this process will run in order of entries in pg_class. Try
SELECT oid, relname FROM pg_class
WHERE relkind = 'r' AND relnamespace = 11
and see if the OIDs seem to match up with the NOTICEs. If so you can
probably assume that the next one after 16386 is the problem.

Another approach is just to individually reindex the tables that are
giving you trouble (pg_class, pg_statistic). Also keep in mind that
pg_statistic is noncritical data --- if all else fails, just do a
DELETE FROM pg_statistic
and then reindex it.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andrew Sukow 2004-08-16 15:24:01 Re: Index Issues & ReIndex
Previous Message Csaba Nagy 2004-08-16 15:00:47 Re: Thousands of parallel connections