Re: Drop Schema Error

From: "Bradley Holbrook" <operations_bradley(at)servillian(dot)ca>
To: 'Viktor Bojović' <viktor(dot)bojovic(at)gmail(dot)com>, "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Drop Schema Error
Date: 2011-01-31 18:00:03
Message-ID: 00d201cbc170$af9c5ff0$0ed51fd0$@servillian.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Worked like a charm, thanks Tom and Viktor.

I’m using version 8.4.5 64bit CentOs Linux

I renamed the schema from permissions to _old_permissions and I believe this caused the error.

From: Viktor Bojović [mailto:viktor(dot)bojovic(at)gmail(dot)com]
Sent: January-29-11 11:16 AM
To: Tom Lane
Cc: Bradley Holbrook; pgsql-admin(at)postgresql(dot)org
Subject: Re: [ADMIN] Drop Schema Error

On Sat, Jan 29, 2011 at 5:57 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

"Bradley Holbrook" <operations_bradley(at)servillian(dot)ca> writes:
> DROP SCHEMA "_old_permissions" CASCADE;

> NOTICE: drop cascades to 2 other objects
> DETAIL: drop cascades to function 17059
> drop cascades to function 17060
> [Err] ERROR: cache lookup failed for function 17060

> What is this trying to tell me?

Apparently you've got some dangling references in pg_depend, ie those
functions were dropped already but the pg_depend entries for them were
not cleaned up.

We've heard similar reports before (usually about temp tables not
functions, IIRC) but never been able to reproduce them or identify a
cause. What PG version is this? Have you done anything funny to that
schema or its contents, or had any crashes around the time of
manipulating either?

As far as cleaning up goes, the thing to do would be to manually delete
the relevant pg_depend entries --- for this one, an entry with objid =
17060 is probably what you're looking for. But it would be good to try
to figure out how you got into this state first.

regards, tom lane

--
Sent via pgsql-admin mailing list (pgsql-admin(at)postgresql(dot)org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

i had that problem when renaming schema which had already objects inside.

functions inside that schema had references to objects inside that schema.

some functions still had reference to old schema name.

so i renamed it again to drop those objects.

It was 8.3.13 or prior version @ 32bit debian linux .

--
---------------------------------------
Viktor Bojović
---------------------------------------
Wherever I go, Murphy goes with me

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2011-01-31 18:24:26 Re: Drop Schema Error
Previous Message Leon Starr 2011-01-31 17:13:41 Re: creating and accessing temp table data inside a non-committed transaction