Re: Allow WAL information to recover corrupted pg_controldata

From: Robert Haas <robertmhaas(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>
Subject: Re: Allow WAL information to recover corrupted pg_controldata
Date: 2012-06-22 15:29:18
Message-ID: CA+TgmoboTwGhes2YMgDBMQiNZaBg==ouRbRaxjcSJjvmkoAuVQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jun 22, 2012 at 5:25 AM, Amit Kapila <amit(dot)kapila(at)huawei(dot)com> wrote:
> Based on the discussion and suggestions in this mail chain, following features can be implemented:
>
> 1. To compute the value of max LSN in data pages based on user input whether he wants it for an individual file,
>   a particular directory or whole database.
>
> 2a. To search the available WAL files for the latest checkpoint record and prints the value.
> 2b. To search the available WAL files for the latest checkpoint record and recreates a pg_control file pointing at that checkpoint.
>
> I have kept both options to address different kind of corruption scenarios.

I think I can see all of those things being potentially useful. There
are a couple of pending patches that will revise the WAL format
slightly; not sure how much those are likely to interfere with any
development you might do on (2) in the meantime.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2012-06-22 15:36:02 Re: COMMUTATOR doesn't seem to work
Previous Message D'Arcy Cain 2012-06-22 15:12:50 Re: COMMUTATOR doesn't seem to work