From: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
---|---|
To: | Amit Kapila <amit(dot)kapila(at)huawei(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Cédric Villemain <cedric(at)2ndquadrant(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com> |
Subject: | Re: Allow WAL information to recover corrupted pg_controldata |
Date: | 2012-06-20 16:07:49 |
Message-ID: | CAHGQGwHcuKA6KJTKmbVX5ZOPJVhXD4Q9Mz__fbnTvybLjBb0tQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Jun 20, 2012 at 12:40 PM, Amit Kapila <amit(dot)kapila(at)huawei(dot)com> wrote:
>>> I believe if WAL files are proper as mentioned in Alvaro's mail, the
> purposed logic should generate
>>> correct values.
>>> Do you see any problem in logic purposed in my original mail.
>>> Can I resume my work on this feature?
>
>> Maybe I'm missing your point, but... why don't you just use PITR to
>> recover from the corruption of pg_control?
>
> AFAIK PITR can be used in a scenario where there is a base back-up and we
> have archived
> the WAL files after that, now it can use WAL files to apply on base-backup.
Yes. If you want to recover the database from the media crash like the
corruption of pg_control file, you basically should take a base backup
and set up continuous archiving.
> In this scenario we don't know a point from where to start the next replay.
> So I believe it will be difficult to use PITR in this scenario.
You can find out the point from the complete pg_control file which was
restored from the backup.
If pg_control is corrupted, we can easily imagine that other database files
would also be corrupted. I wonder how many cases where only pg_control
file gets corrupted are. In that case, pg_resetxlog is unhelpful at all.
You need to use PITR, intead.
Regards,
--
Fujii Masao
From | Date | Subject | |
---|---|---|---|
Next Message | David Fetter | 2012-06-20 16:09:19 | Re: Nasty, propagating POLA violation in COPY CSV HEADER |
Previous Message | Peter Geoghegan | 2012-06-20 15:56:52 | Re: sortsupport for text |