Re: ERROR: type "temp_gc" already exists

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: ERROR: type "temp_gc" already exists
Дата
Msg-id 24056.1126554195@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: ERROR: type "temp_gc" already exists  (Janning Vygen <vygen@gmx.de>)
Список pgsql-general
Janning Vygen <vygen@gmx.de> writes:
> Am Samstag, 10. September 2005 18:05 schrieb Tom Lane:
>> If there's no pg_depend entry then DROP TYPE should work.  Otherwise
>> you might have to resort to manually DELETEing the pg_type row.

> Thanks for your detailed answer. I don't want to do anything wrong. To be
> sure, i have some more questions:

> - There is no entry in pg_depend. Should i just drop the entry from pg_type or
> should i REINDEX anyway?

Well, what did you do to check that there was no entry?  If the index is
corrupt and you issued a query that used the index, it might have failed
to find an entry that's actually there in the table (in fact, if we're
assuming the DROP TYPE didn't happen because the system didn't find the
dependency row while dropping the table, this is pretty much exactly
what you'd expect).  I'd REINDEX and then check again.

> - How can things like this happen? Hardware failure? If yes, should i change
> my harddisk?

Insufficient information to say.  It wouldn't be a bad idea to run some
disk tests though.

> [1] It's not clear to me if pg_depend is a "shared system catalog" because the
> docs say
>    "any of the shared system catalogs (pg_database,
>     pg_group, pg_shadow, or  pg_tablespace)"
> Maybe the iteration is final, maybe it shows only examples)

That's meant to be a complete list --- I've updated the documentation to
make this clearer.  But you could check for yourself:
    select relname from pg_class where relisshared;

            regards, tom lane

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

Предыдущее
От: Steve Atkins
Дата:
Сообщение: Re: linux pg pointed to windows partition for db
Следующее
От: Poul Jensen
Дата:
Сообщение: Re: SQL - planet redundant data