Thread: Postgre cant start

Postgre cant start

From
Olivier Bessière
Date:
<div class="Section1"><p class="MsoNormal">Hello,<p class="MsoNormal"> <p class="MsoNormal">If you can be of any help…
pleasefeel free.<p class="MsoNormal">PostgreSQL V7.1<p class="MsoNormal"> <p
class="MsoNormal">==================================================<pclass="MsoNormal">[postgres@x bin]$ postgres
start<pclass="MsoNormal">DEBUG:  database system was interrupted being in recovery at 2008-04-01 00:31:20 CST<p
class="MsoNormal">       This propably means that some data blocks are corrupted<p class="MsoNormal">        and you
willhave to use last backup for recovery.<p class="MsoNormal">DEBUG:  CheckPoint record at (6, 2667839868)<p
class="MsoNormal">DEBUG: Redo record at (6, 2667793068); Undo record at (0, 0); Shutdown FALSE<p
class="MsoNormal">DEBUG: NextTransactionId: 58839239; NextOid: 18823136<p class="MsoNormal">DEBUG:  database system was
notproperly shut down; automatic recovery in progress...<p class="MsoNormal">DEBUG:  redo starts at (6, 2667793068)<p
class="MsoNormal">FATAL2:  cannot read block 1802 of pg_log: Success<p class="MsoNormal"> <p class="MsoNormal">[root@x
log]#cat boot.log |grep postmaster<p class="MsoNormal">Apr  1 04:48:42 mail1 postgres: postmaster shutdown failed<p
class="MsoNormal">Apr 1 04:49:38 mail1 postgres: postmaster shutdown failed<p class="MsoNormal">Apr  1 04:51:40 mail1
postgres:postmaster shutdown failed<p class="MsoNormal">Mar 31 22:59:14 mail1 postgres: postmaster shutdown failed<p
class="MsoNormal">Mar31 22:59:32 mail1 postgres: postmaster shutdown failed<p class="MsoNormal">Mar 31 23:01:45 mail1
postgres:postmaster shutdown failed<p class="MsoNormal">Mar 31 23:38:10 mail1 postgres: postmaster shutdown failed<p
class="MsoNormal"> <pclass="MsoNormal">Regards<p class="MsoNormal"> <p class="MsoNormal"><b><span
style="font-family:"CenturyGothic","sans-serif"">Olivier Bessière</span></b><p class="MsoNormal"><span
style="font-family:"CenturyGothic","sans-serif"">Network and System Engineer</span><p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"CenturyGothic","sans-serif""> </span><p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"CenturyGothic","sans-serif"; 
color:#76923C">Think green before printing!</span><span style="color:#76923C"></span><p class="MsoNormal"> </div><br
/><br/>__________ Information from ESET NOD32 Antivirus, version of virus signature database 2992 (20080401)
__________<br/><br />The message was checked by ESET NOD32 Antivirus.<br /><br /><a
href="http://www.eset.com">http://www.eset.com</a><br/> 

Re: Postgre cant start

From
Tom Lane
Date:
Olivier Bessière <obessiere@boomerangpharma.com> writes:
> PostgreSQL V7.1

Egad.  You really, really, really need to update forthwith.
The list of bugs that have been fixed since 7.1 would curl your toes.
http://developer.postgresql.org/pgdocs/postgres/release.html

> FATAL 2:  cannot read block 1802 of pg_log: Success

This suggests that pg_log has been truncated.  Try something like
dd bs=8192 count=1 seek=1802 if=/dev/zero of=$PGDATA/global/1269

and try to start the postmaster.  If it then complains about a higher
block number, add that one in the same way, and repeat.

I don't have a whole lot of confidence that this will get you a
self-consistent database, but maybe you will be able to extract
some data.  Dump, compare against your last backup (you do have
one I trust), see what data you believe.

For heaven's sake, update!
        regards, tom lane


Re: Postgre cant start

From
Olivier Bessière
Date:
Hello,

Actually... You're command line just fully fixed my problem. Postmaster is
starting like he never got any problem.

Thank you so much for this helpful answer.

How can I thank you ? Are you traveling to France soon ?

Regards

/Olivier

-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: mardi 1 avril 2008 20:50
To: Olivier Bessière
Cc: pgsql-bugs@postgresql.org
Subject: Re: [BUGS] Postgre cant start

Olivier Bessière <obessiere@boomerangpharma.com> writes:
> PostgreSQL V7.1

Egad.  You really, really, really need to update forthwith.
The list of bugs that have been fixed since 7.1 would curl your toes.
http://developer.postgresql.org/pgdocs/postgres/release.html

> FATAL 2:  cannot read block 1802 of pg_log: Success

This suggests that pg_log has been truncated.  Try something like
dd bs=8192 count=1 seek=1802 if=/dev/zero of=$PGDATA/global/1269

and try to start the postmaster.  If it then complains about a higher
block number, add that one in the same way, and repeat.

I don't have a whole lot of confidence that this will get you a
self-consistent database, but maybe you will be able to extract
some data.  Dump, compare against your last backup (you do have
one I trust), see what data you believe.

For heaven's sake, update!
        regards, tom lane


__________ Information from ESET NOD32 Antivirus, version of virus signature
database 2992 (20080401) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com


__________ Information from ESET NOD32 Antivirus, version of virus signature
database 2994 (20080402) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com