Обсуждение: Can't drop / access / or create database

Поиск
Список
Период
Сортировка

Can't drop / access / or create database

От
Peter Muhlberger
Дата:
I'm trying to drop and re-create a database using postgres 7.1.3.  When I
try to drop the database using postmaster, I get the following error:

postgres% dropdb surveyDB
pqReadData() -- backend closed the channel unexpectedly.
        This probably means the backend terminated abnormally
        before or while processing the request.
connection to server was lost
dropdb: database removal failed

I then tried:

dropdb -i surveyDB

This seemed to go through, though I heard no disk activity.

Then, when I tried to recreate the database, I got:

postgres% createdb surveyDB
ERROR:  CREATE DATABASE: database "surveyDB" already exists
createdb: database creation failed

When I try to create another database:

postgres% createdb BS
pqReadData() -- backend closed the channel unexpectedly.
        This probably means the backend terminated abnormally
        before or while processing the request.
connection to server was lost
createdb: database creation failed

This isn't the first time this has happened to me.  Does anyone have any
suggestions on how I can get out of this mess?  The database is no longer
useable.

Thx,
Peter

Re: Can't drop / access / or create database

От
Tom Lane
Дата:
Peter Muhlberger <peterm@andrew.cmu.edu> writes:
> I'm trying to drop and re-create a database using postgres 7.1.3.  When I
> try to drop the database using postmaster, I get the following error:

You could try reindexing pg_database.  I think that an update to 7.2.3
would be advisable too, as soon as you are able to dump all the data
you care about.

            regards, tom lane