Re: ERROR: type "temp_gc" already exists - Mailing list pgsql-general

From Janning Vygen
Subject Re: ERROR: type "temp_gc" already exists
Date
Msg-id 200509121807.23441.vygen@gmx.de
Whole thread Raw
In response to Re: ERROR: type "temp_gc" already exists  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: ERROR: type "temp_gc" already exists
Re: ERROR: type "temp_gc" already exists
List pgsql-general
Am Samstag, 10. September 2005 18:05 schrieb Tom Lane:
> Janning Vygen <vygen@gmx.de> writes:
> > i guess the table was dropped but not the corresponding type.
> > How can things like this happen?
>
> Corrupted pg_depend table maybe?  You might try REINDEXing pg_depend
> to be on the safe side.  Also please look to see if there are any
> relevant entries in it (look for objid = the type's OID, or refobjid
> = 16562879 which we can see was the table's OID).
>
> > How can i fix it?  Can i just drop the type from pg_type?
>
> 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?

- Can i REINDEX pg_depend in normal operation mode or do i have to take
precautions mentioned in the docs? [1]

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

kind regards,
Janning

[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)



pgsql-general by date:

Previous
From: Greg Stark
Date:
Subject: Re: If an index is based on 3 columns will a query using two of the columns utilize the index?
Next
From: Tom Lane
Date:
Subject: Re: If an index is based on 3 columns will a query using two of the columns utilize the index?