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 CAHGQGwE1nhGsyH7D=qCE_5ZgxcSa_uB6fAd6t6RZTnsmQxotVg@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] Patch to compute Max LSN of Data Pages  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On Wed, Nov 14, 2012 at 5:53 AM, Robert Haas <robertmhaas@gmail.com> wrote:
> On Tue, Nov 13, 2012 at 11:46 AM, Fujii Masao <masao.fujii@gmail.com> wrote:
>> Without this utility, it's difficult to calculate the maximum LSN of
>> data page, so
>> basically we needed to take a backup when starting the standby. In the future,
>> thanks to this utility, we can calculate the maximum LSN, and can skip a backup
>> if that LSN is less than the master (i.e., last applied LSN, IOW,
>> timeline switch LSN).
>
> Doesn't the minimum recovery point give us that?

Yes, but only in the standby. The master doesn't record the minimum recovery
point at all. So, when we start the pre-master as new standby after failover,
we need this utility to know that LSN. Or we need to change the master so that
it records the minimum recovery point like the standby.

BTW, it might be useful to introduce new replication option that makes the data
page fush wait for its corresponding WAL to be replicated. By using this option,
we can ensure that any data page in the master always precede the standby.

Regards,

-- 
Fujii Masao



pgsql-hackers by date:

Previous
From: Amit kapila
Date:
Subject: Re: Proposal for Allow postgresql.conf values to be changed via SQL
Next
From: Alvaro Herrera
Date:
Subject: Re: foreign key locks