Re: I lost the pg_control file - Mailing list pgsql-general

From Tom Lane
Subject Re: I lost the pg_control file
Date
Msg-id 3427.989023159@sss.pgh.pa.us
Whole thread Raw
In response to I lost the pg_control file  (Tulio Oliveira <mestredosmagos@marilia.com>)
List pgsql-general
Tulio Oliveira <mestredosmagos@marilia.com> writes:
> I just lost the pg_control file, located in /usr/local/pgsql/data/global

How did that happen?

> I start a new INITDB after rename the PG_DATA directory to another name,
> but if I copy the pg_control file to real data directory, I receive a
> "NO FILE POINTER ERROR"...

I think you could recover by copying in a freshly-initialized pg_control
(be sure you make it with the same locale setting as before!) and then
running the pg_resetxlog utility from contrib.  You'll probably have to
use the -f switch to pg_resetxlog ... read its README file!

Once you get the postmaster to start, do NOT make any changes to the
database, or you will be very sorry :-(.  Run pg_dumpall, then reload
the data into a correctly initialized database.

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: how to see rules
Next
From: Ashley Clark
Date:
Subject: Re: VACUUM is hanging