Postgresql 9.0.1 Corrupted

From: AI Rumman <rummandba(at)gmail(dot)com>
To: pgsql-general General <pgsql-general(at)postgresql(dot)org>
Subject: Postgresql 9.0.1 Corrupted
Date: 2011-07-18 04:36:38
Message-ID: CAGoODpda0m1SNbztjZJDzUtBn-zsABKb26AHm=_278xoiasDgw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

*Database Version:* Postgresql 9.0.1
*OS:* Linux rumman.dhaka 2.6.18-92.el5xen #1 SMP Tue Jun 10 19:55:54 EDT
2008 i686 i686 i386 GNU/Linux
*Installed from:* Source configure
*Problem:*
When I try to connect to postgres, I got -
psql: FATAL: role "postgres" does not exist
In fact, it seems to me that no role exists.

*Problem Cause:*

For some reason, filesystem of my server was corrupted. Our system admin
used CENTOS repair tools and it damaged the database files.
It created some of the directory as files. These are -
- pg_notify
- pg_xlog
Some files were not readable during start. These were - pg_internal and
pg_control in the global directory.

At first, when I tried to start the server after CENTOS repair, I got the
error message -
DETAIL: The database cluster was initialized with PG_CONTROL_VERSION 0, but
the server was compiled with PG_CONTROL_VERSION 903.

I created a fresh cluster and copied the pg_control and pg_internal from
this cluster to the corrupted cluster.

Then, I tried to start and I got
FATAL: could not open directory "pg_notify": Not a directory

This was created as files instead of directory. I removed it and created the
directory.

At this point, the server started successfully.

Then I tried to connect using psql command.
But I got -
psql: FATAL: role "postgres" does not exist

I tried to use CRAETEUSER. But it can't connect to db.

Please help.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Steve Atkins 2011-07-18 04:58:02 Re: Postgresql 9.0.1 Corrupted
Previous Message Scott Marlowe 2011-07-18 02:30:59 Re: Building an home computer for best Poker Tracker performance