Re: Review: Patch to compute Max LSN of Data Pages

From: 'Andres Freund' <andres(at)2ndquadrant(dot)com>
To: Amit Kapila <amit(dot)kapila(at)huawei(dot)com>
Cc: 'Fujii Masao' <masao(dot)fujii(at)gmail(dot)com>, 'Josh Berkus' <josh(at)agliodbs(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Review: Patch to compute Max LSN of Data Pages
Date: 2013-06-27 05:55:31
Message-ID: 20130627055531.GA8025@awork2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2013-06-27 11:16:25 +0530, Amit Kapila wrote:
> On Wednesday, June 26, 2013 10:19 PM Fujii Masao wrote:
> > On Wed, Jun 26, 2013 at 8:57 PM, Amit Kapila <amit(dot)kapila(at)huawei(dot)com>
> > >> > One more use case for which this utility was done is as below:
> > >> > It will be used to decide that on new-standby (old-master)
> > whether
> > >> a full
> > >> > backup is needed from
> > >> > New-master(old-standby).
> > >> > 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.
> > >>
> > >> That's exactly what I was afraid of. Unless I miss something the
> > tool
> > >> is
> > >> *NOT* sufficient to do this.
> > >
> > > You mean to say if user knows the max LSN of data pages in old-master
> > and
> > > last applied LSN in new master, he cannot decide whether
> > > Full backup is needed? It should be straightforward decision that
> > skip a
> > > backup if that old-master LSN is less than the new-master (i.e., last
> > > applied LSN, IOW, timeline switch LSN).
> > > It was proposed as a usecase in this below mail:
> > > http://www.postgresql.org/message-id/CAHGQGwHyd1fY0hF0qKh0-uKDh-
> > gcbYxMOFBYVk
> > > Kh4jzji-FCfg(at)mail(dot)gmail(dot)com
> >
> > I guess he meant the commit hint bit problem.
>
> True, after reading the thread mentioned by Andres, I got the reason he was
> pointing why it is not sufficient.
> So can it be useful if database has checksums enabled?

I think for that usecase its far more useful to work on getting
pg_rewind since that has a chance of working when local WAL has been
applied that hadn't yet shipped to the other side (which is frequently
the case).

Greetings,

Andres Freund

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2013-06-27 06:17:57 Re: PQConnectPoll, connect(2), EWOULDBLOCK and somaxconn
Previous Message Amit Kapila 2013-06-27 05:46:25 Re: Review: Patch to compute Max LSN of Data Pages