Kari Lavikka <tuner@bdb.fi> writes:
> I noticed the problem while trying to use pg_dump:
> tuner@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