pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bernhard D Rohrer <graylion@sm-wg.net>
To: pgsql-admin@postgresql.org
Subject: pg recovery
Date: Mon, 31 Dec 2007 11:34:04 +0000
Message-ID: <4778D3AC.7080108@sm-wg.net> (raw)

Hi folks

I have a broken database and not much clue about postgres, sorry for the 
n00b questions :(

I have my old raid drive which contains the databases but backup did not 
work, so we don't have one ...

looking at the old database directory I get this:

root@collab:/var/lib/postgresql/8.1/main# 
/usr/lib/postgresql/8.1/bin/pg_controldata .
WARNING: Calculated CRC checksum does not match value stored in file.
Either the file is corrupt, or it has a different layout than this program
is expecting.  The results below are untrustworthy.

pg_control version number:            812
Catalog version number:               200510211
Database system identifier:           5005219046698704127
Database cluster state:               shut down
pg_control last modified:             Thu 26 Dec 13946 17:27:28 GMT
Current log file ID:                  0
Next log file segment:                1474589828
Latest checkpoint location:           0/57E47440
Prior checkpoint location:            0/57E47484
Latest checkpoint's REDO location:    0/0
Latest checkpoint's UNDO location:    1/231175
Latest checkpoint's TimeLineID:       177739
Latest checkpoint's NextXID:          1
Latest checkpoint's NextOID:          0
Latest checkpoint's NextMultiXactId:  1197559863
Latest checkpoint's NextMultiOffset:  4
Time of latest checkpoint:            Thu 11 Jan 1116953 02:46:31 GMT
Maximum data alignment:               131072
Database block size:                  1
Blocks per segment of large relation: 128
Bytes per WAL segment:                1230990949
Maximum length of identifiers:        1414868549
Maximum columns in an index:          3681606
Date/time type storage:               floating-point numbers
Maximum length of locale name:        0
LC_COLLATE:
LC_CTYPE:

if i run

postgres@collab:~/8.1/main$ /usr/lib/postgresql/8.1/bin/pg_resetxlog -n  .
pg_resetxlog: pg_control exists but has invalid CRC; proceed with caution
Guessed pg_control values:

pg_control version number:            812
Catalog version number:               200510211
Database system identifier:           5005219046698704127
Current log file ID:                  0
Next log file segment:                1474589828
Latest checkpoint's TimeLineID:       177739
Latest checkpoint's NextXID:          1
Latest checkpoint's NextOID:          0
Latest checkpoint's NextMultiXactId:  1197559863
Latest checkpoint's NextMultiOffset:  4
Maximum data alignment:               131072
Database block size:                  1
Blocks per segment of large relation: 128
Maximum length of identifiers:        1414868549
Maximum columns in an index:          3681606
Date/time type storage:               floating-point numbers
Maximum length of locale name:        0
LC_COLLATE:
LC_CTYPE:

I end up with no locale and hence understandably a database server that 
won't start ...

I have not yet found a way to set the locale and ctype. hex editor maybe?

any help is appreciated

have a good new year!

thanks

Bernhard
-- 
Graylion's Fetish & Fashion Store
Goth and Kinky Boots, Clothing and Jewellery
http://www.graylion.net



view thread (6+ messages)  latest in thread

Message-ID: <4778D3AC.7080108@sm-wg.net>
Permalink:  ../4778D3AC.7080108@sm-wg.net/
Also on:    postgresql.org/message-id/4778D3AC.7080108@sm-wg.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: graylion@sm-wg.net
  Subject: Re: pg recovery
  In-Reply-To: <4778D3AC.7080108@sm-wg.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox