Re: major database breakdown

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: major database breakdown
Дата
Msg-id 13810.1092669807@sss.pgh.pa.us
обсуждение исходный текст
Ответ на major database breakdown  (Ulrich Wisser <ulrich.wisser@relevanttraffic.se>)
Ответы Re: major database breakdown  (Ulrich Wisser <ulrich.wisser@relevanttraffic.se>)
Список pgsql-general
Ulrich Wisser <ulrich.wisser@relevanttraffic.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

В списке pgsql-general по дате отправления:

Предыдущее
От: Renê Salomão
Дата:
Сообщение: Problem when installing dbsize of PG 8.0-beta1
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Problem when installing dbsize of PG 8.0-beta1