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

From: Amit Kapila <amit(dot)kapila(at)huawei(dot)com>
To: "'Fujii Masao'" <masao(dot)fujii(at)gmail(dot)com>
Cc: "'Alvaro Herrera'" <alvherre(at)2ndquadrant(dot)com>, "'Robert Haas'" <robertmhaas(at)gmail(dot)com>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Patch to compute Max LSN of Data Pages
Date: 2012-11-15 05:08:37
Message-ID: 009f01cdc2ef$45c51a90$d14f4fb0$@kapila@huawei.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wednesday, November 14, 2012 10:19 PM Fujii Masao wrote:
> On Thu, Nov 15, 2012 at 12:55 AM, Amit Kapila <amit(dot)kapila(at)huawei(dot)com>
> wrote:
> > Now user can use this utility to decide if new-standby has max LSN
> greater
>
> > And that situation can occur when new-standby has startpoint LSN
> greater
> > than new-master?
>
> Whether the backup is required has nothing to do with the startpoint.
> The backup is required when the data page in old-master precedes
> the last applied LSN in old-standby (i.e., new-master) at the moment
> of the failover. Without the backup, there is no way to revert the data
> which is ahead of new-master.

Okay.
So as Robert and Alvaro suggested to have it separate utility rather than
having options in pg_resetxlog to print MAX LSN seems to be quite
appropriate.
I am planning to update the patch to make it a separate utility as
pg_computemaxlsn with options same as what I have proposed for pg_resetxlog
to print MAX LSN.
So considering it a separate utility there can be 2 options:
a. have a utility in contrib.
b. have a utility in bin similar to pg_resetxlog.

What is the best place to have it?

With Regards,
Amit Kapila.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Shigeru Hanada 2012-11-15 05:33:21 Re: Move postgresql_fdw_validator into dblink
Previous Message Peter Eisentraut 2012-11-15 05:06:49 Re: Doc patch, put commas in the right place in pg_restore docs