Re: pg_dump: missing pg_database entry - Mailing list pgsql-general

From Florian G. Pflug
Subject Re: pg_dump: missing pg_database entry
Date
Msg-id 448EAE0F.9080001@phlo.org
Whole thread Raw
In response to pg_dump: missing pg_database entry  (gl@lbn.fr)
List pgsql-general
gl@lbn.fr wrote:
> Hello,
>
> I'm experiencing a strange problem with PostgreSQL 7.4.9.
> One of my database production servers has 2 large databases, it's still
> possible to connect to them and pass queries, but the pg_database
> system table is empty, which prohibits such actions as dumping the
> databases.
I believe that postgresql keeps a plaintext copy of the database table,
because it can't access that table until you are connected.

I'd suggest you make a backup of you whole data directory immediatly, in
case things get worse (e.g. some tries to create a database, and this causes
the plaintext copy to be overwritten).

One reason the pg_database table seems to be empty could be oid wraparound.
Has this database been vacuumed regularly? If not, try doing a "vacuum full"
now - according to some earlier discussion about oid wraparound on this list
this should fix the problem if the wraparound hasn't happend too long ago.

But, in any case, take a (filesystem leven) backup of your database NOW, before
you do anything else.

greetings, Florian Pflug



pgsql-general by date:

Previous
From: "Florian G. Pflug"
Date:
Subject: Re: Searching BLOB
Next
From: "Florian G. Pflug"
Date:
Subject: Re: Help speeding up this query - maybe need another index?