Re: Change pgarch_readyXlog() to return .history files first

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: David Steele <david(at)pgmasters(dot)net>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Change pgarch_readyXlog() to return .history files first
Date: 2018-12-21 03:19:21
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Thu, Dec 20, 2018 at 01:57:30PM +0200, David Steele wrote:
> Good point. The new patch uses IsTLHistoryFileName().

OK, I have been reviewing the patch and the logic is correct, still I
could not resist reducing the number of inner if's for readability. I
also did not like the high-jacking of rlde->d_name so instead let's use
an intermediate variable to store the basename of a scanned entry. The
format of the if/elif with comments in-between was not really consistent
with the common practice as well. pg_indent has also been applied.

> Ah, I see. Yes, that's exactly how I tested it, in addition to doing real
> promotions.

OK, so am I doing.

Attached is an updated patch. Does that look fine to you? The base
logic is unchanged, and after a promotion history files get archived
before the last partial segment.

Attachment Content-Type Size
history-files-first-v4.patch text/x-diff 3.3 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Edmund Horner 2018-12-21 03:19:35 Re: Tid scan improvements
Previous Message Ashutosh Bapat 2018-12-21 02:20:04 Re: [HACKERS] Macros bundling RELKIND_* conditions