Re: Change pgarch_readyXlog() to return .history files first
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: David Steele <david@pgmasters.net>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2018-12-21T03:19:21Z
Lists: pgsql-hackers
Attachments
- history-files-first-v4.patch (text/x-diff) patch v4
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. -- Michael
Commits
-
Prioritize history files when archiving
- 37126251ab77 9.5.16 landed
- 9378701243b5 9.6.12 landed
- 0857575774a2 10.7 landed
- a016f59d5901 11.2 landed
- b981df4cc09a 12.0 landed