Re: [GENERAL] Help with database recovery ...
On Tue, 2011-05-03 at 01:14 -0400, Tom Lane wrote: Craig Ringer cr...@postnewspapers.com.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 -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
Re: [GENERAL] Help with database recovery ...
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 -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
Re: [GENERAL] Help with database recovery ...
Craig Ringer cr...@postnewspapers.com.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 -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
[GENERAL] Help with database recovery ...
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@pg_log]# postgres --version postgres (PostgreSQL) 8.1.18 OS is Centos. Any hint ? -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
Re: [GENERAL] Help with Database Recovery
"Hancock, David (DHANCOCK)" [EMAIL PROTECTED] writes: Sorry I didn't give more detail. OS is Linux 2.2 kernel, PostgreSQL is 6.5.3. The problem is that I copied the .../base/* directories elsewhere in preparation for making base a symlink to a different filesystem with more space. I then screwed up and removed everything in /var/lib/pgsql, not just the base directories. This necessitated a reinstall of PostgreSQL. I know, I know ... it was a very stupid maneuver on my part, but it's a strange feeling to know that I've GOT the database files, I just can't use 'em. Yet. Unfortunately, you've only got *part* of the database. The above maneuver destroyed your pg_log file, which is essential. Without it, you've got a lot of tuples but you don't know which ones are valid. If you did a VACUUM just before all this, then there's a reasonable chance that the tuples you have left are mostly just valid ones. Otherwise I'd say it's hopeless. In any case you will not be able to reconstruct data that you can trust except after painstaking manual examination. How far back was your last regular whole-file-system backup? Restoring all of /var/lib/pgsql off that is likely to be your best shot at getting to a state that's somewhat trustworthy. regards, tom lane