Re: [PATCH] Patch to compute Max LSN of Data Pages

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Amit kapila <amit(dot)kapila(at)huawei(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Patch to compute Max LSN of Data Pages
Date: 2012-11-12 16:17:14
Message-ID: CA+TgmoYpDCRd1fgn3QtqpNcz1s=RM0gGS5AivCLakWiu-mbCGw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jul 31, 2012 at 8:09 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.
>
> Based on above conclusion, I have prepared a patch which implements Option-1

I wonder if we shouldn't make this a separate utility, rather than
something that is part of pg_resetxlog. Anyone have a thought on that
topic?

--
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-11-12 16:20:08 Re: TRUNCATE SERIALIZABLE and frozen COPY
Previous Message Bruce Momjian 2012-11-12 16:11:03 Re: Further pg_upgrade analysis for many tables