Skip site navigation (1) Skip section navigation (2)

Unable to drop index

From: Oliver Duke-Williams <o(dot)w(dot)duke-williams(at)leeds(dot)ac(dot)uk>
To: pgsql-admin(at)postgresql(dot)org
Subject: Unable to drop index
Date: 2005-04-26 12:13:11
Message-ID: 426E3057.6010804@leeds.ac.uk (view raw or flat)
Thread:
Lists: pgsql-admin
Hi,

I have an error trying to drop an index using PostgreSQL 7.4.6 running 
on Solaris 2.9.

The table on which the index was built is no longer present (it should 
have been dropped by my application after being used), but it would 
appear that the index was not dropped at the same time as the table:

drop index iext_41827440000_24 ;
ERROR:  could not open relation with OID 147483811

Looking in pg_class for an entry with this OID (147483811) returns 0 
rows; an entry exists in pg_class for the index itself.

How can I safely remove the index?  The old copy of the index is 
preventing the creation of a new table and associated index of the same 
names.

Would manually deleting the records that relate to the index in pg_index 
and pg_class be sufficient, or is that likely to do more harm than good?

Many thanks,

Oliver


-- 
Oliver Duke-Williams <o(dot)w(dot)duke-williams(at)leeds(dot)ac(dot)uk>
School of Geography University of Leeds


Responses

pgsql-admin by date

Next:From: Garris, NicoleDate: 2005-04-26 17:55:36
Subject: FW: pg_dump not in object dependency order for sequences used for primary keys
Previous:From: Alexander RusinovDate: 2005-04-26 11:24:58
Subject: PostgreSQL in FreeBSD jails

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group