Re: Cannot drop sequence...

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Cannot drop sequence...
Дата
Msg-id 15497.990196996@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Cannot drop sequence...  (D0 <jnielsen@aero-graphics.com>)
Список 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 по дате отправления:

Предыдущее
От: "Muhammed Yazici"
Дата:
Сообщение: createdb -D /other/path dbname does not work
Следующее
От: SZALAI Karoly
Дата:
Сообщение: plpgsl or other pl faq