Re: Service doesnt UP!!!! - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: Service doesnt UP!!!!
Date
Msg-id 20031107183434.GA16685@dcc.uchile.cl
Whole thread Raw
In response to Re: Service doesnt UP!!!!  ("Edwin Quijada" <listas_quijada@hotmail.com>)
Responses Re: Service doesnt UP!!!!  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
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)

Attachment

pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: int8 primary keys still not using index without manual
Next
From: Tom Lane
Date:
Subject: Re: int8 primary keys still not using index without manual