corrupted pg_xlog/0000000000000000

Started by Scott Parishabout 25 years ago2 messagesgeneral
Jump to latest
#1Scott Parish
sRp@srparish.net

I have a production database running postgresql 7.1beta4. Everything
was great untill '/etc/rc.d/init.d/pgsql stop' was ran. Now when ever a
person makes an attempt to start the database postmaster refuses to
start saying:

DEBUG: starting up
DEBUG: database system was interrupted at 2001-02-26 14:34:09
DEBUG: CheckPoint record at (0, 5962224)
FATAL 2: Invalid RMID in checkPoint record
DEBUG: proc_exit(2)
DEBUG: shmem_exit(2)
DEBUG: exit(2)
/apps/pgsql/bin/postmaster: reaping dead processes...
Startup failed - abort

After doing a lot of probing around it appears that all the base/* files
and global/* files are fine, however these seem to be useless without
the pg_xlog/0000000000000000 file, which appears to contain the
structure for the tables of the database.

Are there any suggestions on how i may go about recovering from this
incident without starting from scratch?

Thank
sRp

--
Scott Parish
http://srparish.net/

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Scott Parish (#1)
Re: corrupted pg_xlog/0000000000000000

Scott Parish <sRp@srparish.net> writes:

I have a production database running postgresql 7.1beta4. Everything
was great untill '/etc/rc.d/init.d/pgsql stop' was ran. Now when ever a
person makes an attempt to start the database postmaster refuses to
start saying:

DEBUG: starting up
DEBUG: database system was interrupted at 2001-02-26 14:34:09
DEBUG: CheckPoint record at (0, 5962224)
FATAL 2: Invalid RMID in checkPoint record

Hmm, that was after a successful shutdown!? Ugh.

Are there any suggestions on how i may go about recovering from this
incident without starting from scratch?

I'm planning to take a hard look at WAL robustness over the next day or
two, but if you need to get this DB back in production right now then
I'm afraid you have little choice but initdb.

It would be good if you could save aside the current contents of the
data directory as a test case for the repaired code, though. Even
better, could you send me the contents of your pg_xlog directory (or
maybe even the whole database if it's not very large) for debugging
purposes?

regards, tom lane