Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 8CAE62E3008 for ; Mon, 31 Dec 2007 07:34:10 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 53327-09 for ; Mon, 31 Dec 2007 07:34:06 -0400 (AST) Received: from collab.sm-wg.net (collab.sm-wg.net [86.43.106.231]) by postgresql.org (Postfix) with ESMTP id 27F2B2E2F78 for ; Mon, 31 Dec 2007 07:34:06 -0400 (AST) Received: from collab.sm-wg.net (localhost [127.0.0.1]) by collab.sm-wg.net (Postfix) with ESMTP id CB7512D15B1 for ; Mon, 31 Dec 2007 11:34:04 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sm-wg.net; h=message-id: date:from:mime-version:to:subject:content-type: content-transfer-encoding; q=dns/txt; s=m1; bh=LkM0JR8Tupiw6lVe+ fGVYKiW18Y=; b=i1B09jovNQkDOs/bg8V5s3oA1lN2jWatV1uM2PBOfhZgOttbT YbPnwn4Q9v8Eqsran9GVEvEax8DygW1A4LzHqYmEhJKD5cgqwtzDourlw8L2xs6A TcZFjDgw67QfwnCoh9adTic+k24mHLejoWryDnzkp2UzZ2UC+xwK/Oc9UU= Received: from [192.168.1.8] (unknown [192.168.1.8]) by collab.sm-wg.net (Postfix) with ESMTP id B9DAE2D15B0 for ; Mon, 31 Dec 2007 11:34:04 +0000 (GMT) Message-ID: <4778D3AC.7080108@sm-wg.net> Date: Mon, 31 Dec 2007 11:34:04 +0000 From: Bernhard D Rohrer User-Agent: Thunderbird 2.0.0.6 (X11/20071022) MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: pg recovery Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200712/255 X-Sequence-Number: 27772 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