Re: Corrupted DB? could not open file pg_clog/#### - Mailing list pgsql-general

From Francisco Reyes
Subject Re: Corrupted DB? could not open file pg_clog/####
Date
Msg-id cone.1154293114.148408.42196.1000@zoraida.natserv.net
Whole thread Raw
In response to Corrupted DB? could not open file pg_clog/####  (Francisco Reyes <lists@stringsutils.com>)
Responses Re: Corrupted DB? could not open file pg_clog/####  (Martijn van Oosterhout <kleptog@svana.org>)
List pgsql-general
Martijn van Oosterhout writes:

> It's still a reasonable suggestion. The maximum offset is the number of
> rows in the table. You'll notice when the output is empty.

Once I find the point where the output is empty then what?

> Do you have
> an idea how much data it contains?

Yes. Around 87 million rows.


> If you connect via psql, you can set the client_min_message to DEBUG to
> get some more stuff.

How?
Tried set client_min_message='DEBUG';

> Well, it will stop complaining. What will happen is that any
> transactions involving those transaction IDs will be assumed to have
> been committed.

If the pg_clog files are to keep track of transactions, shouldn't a "pg_ctl
restart"  rollback all pending transactions.. so there are no pending
transactions upon the restart and this error should not appear again?
Using 8.1.4

> This may be ok, but in extreme cases it could lead to
> broken constraints.

That exteme case sounds pretty bad. :-(
Will it be safe to do after a restart? After all there should not be any
transactions..

> However, pg_clog/0000 is the very first transaction file created. Is it
> in the range of the files that do do exist?

There are 228 files in the directory and the oldest one is "016E" from about
a month ago.

>  Are you sure some other
> process didn't remove it accedently?

Not that I can think off. I didn't even know what this diretory was until
this problem showed up.. much less delete anything from it.

pgsql-general by date:

Previous
From: "Dawid Kuroczko"
Date:
Subject: Re: Secure connections with changing ip addresses?
Next
From: "Florian G. Pflug"
Date:
Subject: Re: Questions about update, delete, ctid...