On Fri, Nov 07, 2003 at 05:40:31PM +0000, Edwin Quijada wrote:
> LOG: database system was interrupted at 2003-11-07 10:54:32 CET
> LOG: checkpoint record is at 1/34600318
> LOG: redo record is at 1/34600318; undo record is at 0/0; shutdown FALSE
> LOG: next transaction id: 6326695; next oid: 5776573
> LOG: database system was not properly shut down; automatic recovery in
> progress
> LOG: redo starts at 1/34600358
> PANIC: Invalid page header in block 8805 of 17097
Edwin has said elsewhere that he is using 7.3.4 and the filesystem is
ReiserFS. (Edwin, you should really include _all relevant_ information
when posting these things. I don't ask just to amuse myself, you know.)
I _think_ you should make a copy of PGDATA somewhere safe; then activate
zero_damaged_pages in postgresql.conf and restart the server. After
that, check all your data on the table with OID 17097, deactivate
zero_damaged_pages, make a backup copy of the table using pg_dump, and
try to restore whatever was lost on block 8805 of that table. (Maybe
you could get at the data using pg_filedump or pgfsck, to be found at
http://sources.redhat.com/rhdb and http://svana.org/kleptog
respectively).
Then please if you value your data that much, do frequent backups _or_
stop using IDE disks, and maybe activate fsync if you deactivated it.
Hmm ... oops ... I'm seeing there's no zero_damaged_pages in 7.3
documentation. So much for this solution :-( Maybe a hacked postmaster
could do the trick? I'm attaching a patch that seems to do the trick
(just out of CVS -- I didn't try compiling it).
PS: I'm Cc'ing pgsql-ayuda, just for the record ...
--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"I call it GNU/Linux. Except the GNU/ is silent." (Ben Reiter)