Re: [PATCH] Patch to compute Max LSN of Data Pages - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: [PATCH] Patch to compute Max LSN of Data Pages
Date
Msg-id CAHGQGwFUM8cL9cwCGuwtLVoLvzsjq035mbTrGufwqjQBk_2GKQ@mail.gmail.com
Whole thread Raw
In response to [PATCH] Patch to compute Max LSN of Data Pages  (Amit kapila <amit.kapila@huawei.com>)
Responses Re: [PATCH] Patch to compute Max LSN of Data Pages  (Amit Kapila <amit.kapila@huawei.com>)
List pgsql-hackers
On Thu, Nov 15, 2012 at 12:55 AM, Amit Kapila <amit.kapila@huawei.com> wrote:
> Now user can use this utility to decide if new-standby has max LSN greater
> than max LSN of new-master he needs to use fullback-up on new-standby. Is my
> understanding right?

No. The maximum LSN of data pages in new-standby should be compared with
the last replayed LSN (IOW, the last valid LSN of previous timeline)
of new-master.

>>OTOH, there can be the case
>> where new master has already been ahead of the startpoint.
>
>
>  But in this case, there is no need for this utility. Right?

No. The above comparison is required in this case.

>
>> > So now user may not be able to decide whether he needs to do
>> incremental or
>> > full backup from new master,
>> > is this the case you are trying to point?
>>
>> Sorry, I could not parse this comment. Could you elaborate your concern
>> again?
>
> I wanted to understand the usecase mentioned by you for this utility.
> As far as I can understand is that it will be used to decide that on
> new-standby (old-master) whether a full backup is needed from
> New-master(old-standby).

Yes.

> 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.

Regards,

-- 
Fujii Masao



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: WIP patch: add (PRE|POST)PROCESSOR options to COPY
Next
From: Andrew Dunstan
Date:
Subject: Re: WIP patch: add (PRE|POST)PROCESSOR options to COPY