Re: Help with database recovery ...

Lists: pgsql-general
From: Iztok Stotl <iztok(dot)stotl(at)guest(dot)arnes(dot)si>
To: pgsql-general(at)postgresql(dot)org
Subject: Help with database recovery ...
Date: 2011-05-01 19:32:22
Message-ID: 1304278344.21857.2.camel@Hal
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

My database crashed and server won't start ...

------------------------------------------------------
LOG: database system was interrupted while in recovery at 2011-05-01
19:31:37 CEST
HINT: This probably means that some data is corrupted and you will have
to use the last backup for recovery.
LOG: checkpoint record is at 2/D41C1350
LOG: redo record is at 2/D41C1350; undo record is at 0/0; shutdown
FALSE
LOG: next transaction ID: 752151177; next OID: 50716
LOG: next MultiXactId: 1; next MultiXactOffset: 0
LOG: database system was not properly shut down; automatic recovery in
progress
LOG: redo starts at 2/D41C1394
PANIC: could not access status of transaction 752150401
DETAIL: could not read from file "pg_clog/02CD" at offset 73728:
Success
LOG: startup process (PID 3504) was terminated by signal 6
LOG: aborting startup due to startup process failure
LOG: logger shutting down
---------------------------------------------------------------
What can I do ?

[root(at)pg_log]# postgres --version
postgres (PostgreSQL) 8.1.18

OS is Centos.

Any hint ?


From: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
To: Iztok Stotl <iztok(dot)stotl(at)guest(dot)arnes(dot)si>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Help with database recovery ...
Date: 2011-05-03 01:24:24
Message-ID: 4DBF5948.6070709@postnewspapers.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

On 02/05/11 03:32, Iztok Stotl wrote:
> My database crashed and server won't start ...
>
> ------------------------------------------------------
> LOG: database system was interrupted while in recovery at 2011-05-01
> 19:31:37 CEST
> HINT: This probably means that some data is corrupted and you will have
> to use the last backup for recovery.
> LOG: checkpoint record is at 2/D41C1350
> LOG: redo record is at 2/D41C1350; undo record is at 0/0; shutdown
> FALSE
> LOG: next transaction ID: 752151177; next OID: 50716
> LOG: next MultiXactId: 1; next MultiXactOffset: 0
> LOG: database system was not properly shut down; automatic recovery in
> progress
> LOG: redo starts at 2/D41C1394
> PANIC: could not access status of transaction 752150401
> DETAIL: could not read from file "pg_clog/02CD" at offset 73728:
> Success
> LOG: startup process (PID 3504) was terminated by signal 6
> LOG: aborting startup due to startup process failure
> LOG: logger shutting down
> ---------------------------------------------------------------
> What can I do ?

This shouldn't happen unless something broke badly on your system. Check
your disks and file systems.

Before trying to fix anything, make a complete copy of the entire
postgresql directory, the one that contains the 'pg_xlog', 'pg_clog'
folders etc. Store that copy on a removable hard drive or some other
media that's not connected to the system you're recovering.

This message is very weird: "could not read from file "pg_clog/02CD" at
offset 73728: Success". What does 'ls -l pg_clog/' say?

--
Craig Ringer


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
Cc: Iztok Stotl <iztok(dot)stotl(at)guest(dot)arnes(dot)si>, pgsql-general(at)postgresql(dot)org
Subject: Re: Help with database recovery ...
Date: 2011-05-03 05:14:54
Message-ID: 11788.1304399694@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Craig Ringer <craig(at)postnewspapers(dot)com(dot)au> writes:
> This message is very weird: "could not read from file "pg_clog/02CD" at
> offset 73728: Success".

Probably indicates an attempted read from beyond EOF. The main
relation-access code paths have been fixed to give a more intelligible
error message about that case, but it doesn't look like slru.c has been.

regards, tom lane


From: Iztok Stotl <iztok(dot)stotl(at)guest(dot)arnes(dot)si>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>, pgsql-general(at)postgresql(dot)org
Subject: Re: Help with database recovery ...
Date: 2011-05-07 19:14:20
Message-ID: 1304795661.1970.28.camel@Hal
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

On Tue, 2011-05-03 at 01:14 -0400, Tom Lane wrote:
> Craig Ringer <craig(at)postnewspapers(dot)com(dot)au> writes:
> > This message is very weird: "could not read from file "pg_clog/02CD" at
> > offset 73728: Success".
>
> Probably indicates an attempted read from beyond EOF. The main
> relation-access code paths have been fixed to give a more intelligible
> error message about that case, but it doesn't look like slru.c has been.

I gave up. I formated the disc ;)

Next time ... backup more often ...

Thank you guys for your answers.

Iztok