From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
---|---|
To: | Brahim EL ALLIOUI <belallioui(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: how to regenerate pg_control file ? |
Date: | 2016-04-01 18:42:04 |
Message-ID: | 56FEC0FC.1010603@aklaver.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 04/01/2016 10:44 AM, Brahim EL ALLIOUI wrote:
> Hi,
>
> Following a power failure the database is corrupt.
> I found that the file "pg_control" missing.
> I executed the command "pg_resetxlog" and he gave me the message:
What version of Postgres?
Exactly what was the command you gave?
In particular did you specify the data directory?
>
> run : touch global/pg_control
>
> Please, what should be done ?
If you have the space back up the existing data directory somewhere
before going any further.
Confirm that pg_control does not actually exist.
If pg_control does not exist, read the instructions for the -f option here:
http://www.postgresql.org/docs/9.5/static/app-pgresetxlog.html
Be aware of this:
"After running this command, it should be possible to start the server,
but bear in mind that the database might contain inconsistent data due
to partially-committed transactions. You should immediately dump your
data, run initdb, and reload. After reload, check for inconsistencies
and repair as needed."
>
> Thanks,
>
>
>
>
> *Brahim EL ALLIOUI*
> *General Manager*
> belallioui(at)e-acta(dot)com <mailto:belallioui(at)e-acta(dot)com>
> Skype : belallioui
> Tel : +212535749410
> Mobile : +212661940077
> www.e-acta.com <http://www.e-acta.com/>
>
>
>
--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Seamus Abshere | 2016-04-03 01:07:13 | plpgsql update row from record variable |
Previous Message | Moreno Andreo | 2016-04-01 18:15:16 | Re: Multimaster |