Ok I nulled out the bad pages. A pg_dump still fails. I just noticed there
are 21000 files in my database directory. Most of the form INDEXNAME.NUMBER
where INDEXNAME is the name of one of my indexes and NUMBER is a sequential
number. There are 4 or 5 different indexes involved. All of these files
are 0 bytes in size. All dated in the last day or two.
When I did the pg_dump I got this in the log file:
000914.18:00:07.600 [10406] FATAL 1: Memory exhausted in AllocSetAlloc()
Smart Shutdown request at Thu Sep 14 18:07:15 2000
The dump died after putting 100MB in the output file.
My guess is the internal structure of one of the tuples is corrupt. I have
know idea what all the other files are for or if they one problem is the
cause of the other.
At this moment I am doing a tar of the database directory before I screw
anything else up.
Please help me.