Re: [SQL] Re: pg_dump potential bug -UNIQUE INDEX on PG_SHADOW Dont!! HELP

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [SQL] Re: pg_dump potential bug -UNIQUE INDEX on PG_SHADOW Dont!! HELP
Дата
Msg-id 28002.986083070@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: pg_dump potential bug -UNIQUE INDEX on PG_SHADOW Dont!! HELP  (Marcin Kowalski <kowalski@datrix.co.za>)
Список pgsql-admin
Marcin Kowalski <kowalski@datrix.co.za> writes:
> DON'T DO THIS!!!
> -------
> CREATE UNIQUE INDEX shadow_index ON pg_shadow (usename)
> -------

Indeed, trying to create nonstandard indexes on system catalogs is a BAD
idea.  There probably ought to be a check to prevent you from trying.

> What can I do??? I've got a non-trivial amount of data that I cannot afford
> to lose!! HELP!..

I think you'd be OK if you could drop the index and then do

update pg_class set relhasindex = 'f' where relname = 'pg_shadow';

The trick is to be able to do that when the database is busted.
I think you may be able to do this if you restart in "ignore system
indexes" mode (use "-o -P" while starting postmaster).  Worth a try
anyway.

            regards, tom lane

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

Предыдущее
От: Andrea Fanfani
Дата:
Сообщение: Re: Help - Index on pg_shadow corruption!! Database down!!
Следующее
От: "IGB.NET"
Дата:
Сообщение: ...