Re: Postgresql 9.0.1 Corrupted

From: Steve Atkins <steve(at)blighty(dot)com>
To: AI Rumman <rummandba(at)gmail(dot)com>
Cc: pgsql-general General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Postgresql 9.0.1 Corrupted
Date: 2011-07-18 04:58:02
Message-ID: 61B29FE3-2EF8-428C-B1A2-D5601A988B04@blighty.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Jul 17, 2011, at 9:36 PM, AI Rumman wrote:

> 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.

Your data is probably gone. Check when you last made backups.

But before you do *anything* else, create a full filesystem level copy of the entire database directory, so that when you end up breaking things further by trying to recover it you'll have a "clean" copy of the corrupted database to start over from.

Cheers,
Steve

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Craig Ringer 2011-07-18 07:03:33 Re: Postgresql 9.0.1 Corrupted
Previous Message AI Rumman 2011-07-18 04:36:38 Postgresql 9.0.1 Corrupted