Re: contents of pg_database vanished..

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Kari Lavikka <tuner(at)bdb(dot)fi>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: contents of pg_database vanished..
Date: 2004-06-07 15:48:37
Message-ID: 4573.1086623317@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Kari Lavikka <tuner(at)bdb(dot)fi> writes:
> I noticed the problem while trying to use pg_dump:
> tuner(at)xyzzy:~$ /usr/local/pgsql/bin/pg_dump -Ugalleria galleria
> pg_dump: missing pg_database entry for database "galleria"

Hm. The row must still be there, else you could not have got that far.
If you do "select * from pg_database", do you see all the rows you
expect? How about "select * from pg_database where datname = 'galleria'"?

If you see the row with an unqualified select but not with "where
datname =", then I'd bet on the index for pg_database.datname being
corrupted. You should be able to fix this with REINDEX. Since
pg_database is a shared catalog, that will mean shutting down the
postmaster --- read the details in the REINDEX man page.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2004-06-07 15:50:40 Re: [HACKERS] CREATE DATABASE on the heap with PostgreSQL?
Previous Message Campano, Troy 2004-06-07 15:27:15 Re: Backup and Restore of PostgreSQL