Re: Cannot drop sequence... - Mailing list pgsql-admin

From Tom Lane
Subject Re: Cannot drop sequence...
Date
Msg-id 15497.990196996@sss.pgh.pa.us
Whole thread Raw
In response to Cannot drop sequence...  (D0 <jnielsen@aero-graphics.com>)
List pgsql-admin
D0 <jnielsen@aero-graphics.com> writes:
> ERROR:  Relation 'analytics_bud_analytics_bud_seq' already exists
> agi_db=# drop sequence analytics_bud_analytics_bud_seq;
> ERROR:  Relation 'analytics_bud_analytics_bud_seq' does not exist

What PG version are you running?  This looks like the classic catch-22
from pre-7.1 versions wherein you tried to roll back a DROP operation.
The pg_class entry for the dropped sequence rolls back just fine, but
the physical file is already gone, leading to no end of confusion when
you try to manipulate the object later.

If that's what it is, you can resolve the inconsistency and make the
DROP possible with something like

    touch $PGDATA/base/agi_db/analytics_bud_analytics_bud_seq

            regards, tom lane

pgsql-admin by date:

Previous
From: "Muhammed Yazici"
Date:
Subject: createdb -D /other/path dbname does not work
Next
From: SZALAI Karoly
Date:
Subject: plpgsl or other pl faq