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

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Amit kapila <amit(dot)kapila(at)huawei(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, "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-14 15:21:19
Message-ID: CAHGQGwE1nhGsyH7D=qCE_5ZgxcSa_uB6fAd6t6RZTnsmQxotVg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Nov 14, 2012 at 5:53 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Tue, Nov 13, 2012 at 11:46 AM, Fujii Masao <masao(dot)fujii(at)gmail(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2012-11-14 15:23:47 Re: foreign key locks
Previous Message Amit kapila 2012-11-14 15:11:16 Re: Proposal for Allow postgresql.conf values to be changed via SQL