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

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Andres Freund <andres(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: haribabu(dot)kommi(at)huawei(dot)com, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Review: Patch to compute Max LSN of Data Pages
Date: 2013-09-14 07:03:23
Message-ID: CAA4eK1JBKNPFJ2=XLjtXbSYn3_S7wa9kfai0GKoPr--aNNCedQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>On Monday, July 08, 2013 5:16 PM Andres Freund wrote:
>>On 2013-07-08 17:10:43 +0530, Amit Kapila wrote:
>>> On Monday, July 08, 2013 4:26 PM Andres Freund wrote:
>>> > On 2013-07-08 16:17:54 +0530, Hari Babu wrote:
>>> > > + This utility can also be used to decide whether backup is
>>> > required or not 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.
>>> > > + </para>
>>> > > + </refsect1>
>>> >
>>> > I don't think this is safe in any interesting set of cases. Am I
>>> > missing
>>> > something?
>>>
>>> No, you are not missing anything. It can be only used to find max LSN in
>>> database which can avoid further corruption

>>Why is the patch submitted documenting it as a use-case then? I find it
>>rather scary if the *patch authors* document a known unsafe use case as
>>one of the known use-cases.

>I got the problem which can occur with the specified use case. Removed the
>wrong use case specified above.
>Thanks for the review, please find the updated patch attached in the mail.

Patch is not getting compiled on Windows, I had made following changes:
a. updated the patch for resolving Windows build
b. few documentation changes in (pg_resetxlog.sgml) for spelling
mistake and minor line change
c. corrected year for Copyright in file pg_computemaxlsn.c

With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

Attachment Content-Type Size
pg_computemaxlsn_v11.patch application/octet-stream 16.9 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Satoshi Nagayasu 2013-09-14 07:18:50 Re: [PoC] pgstattuple2: block sampling to reduce physical read
Previous Message Pavel Stehule 2013-09-14 06:29:05 Re: Proposal: PL/PgSQL strict_mode