pg recovery

Поиск
Список
Период
Сортировка
От Bernhard D Rohrer
Тема pg recovery
Дата
Msg-id 4778D3AC.7080108@sm-wg.net
обсуждение исходный текст
Ответы Re: pg recovery  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-admin
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

В списке pgsql-admin по дате отправления:

Предыдущее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: What's the XID?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pg recovery