Re: Cannot drop sequence...

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: D0 <jnielsen(at)aero-graphics(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Cannot drop sequence...
Date: 2001-05-18 14:43:16
Message-ID: 15497.990196996@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

D0 <jnielsen(at)aero-graphics(dot)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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Bruce Momjian 2001-05-18 15:41:40 Re: Cost limit.
Previous Message Rebecca.R.Hepper 2001-05-18 14:03:15 Script to createuser