Re: .ready and .done files considered harmful
Dipesh Pandit <dipesh.pandit@gmail.com>
From: Dipesh Pandit <dipesh.pandit@gmail.com>
To: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: "Bossart, Nathan" <bossartn@amazon.com>,
Robert Haas <robertmhaas@gmail.com>, Jeevan Ladhe <jeevan.ladhe@enterprisedb.com>,
Stephen Frost <sfrost@snowman.net>, Andres Freund <andres@anarazel.de>, Hannu Krosing <hannuk@google.com>,
pgsql-hackers@postgresql.org
Date: 2021-08-12T11:52:12Z
Lists: pgsql-hackers
Attachments
- v6-0001-mitigate-directory-scan-for-WAL-archiver.patch (text/x-patch) patch v6-0001
Hi, Thanks for the feedback. The possible path that archiver can take for each cycle is either a fast path or a fall-back patch. The fast path involves checking availability of next anticipated log segment and decide the next target for archival or a fall-back path which involves full directory scan to get the next log segment. We need a mechanism that enables the archiver to select the desired path for each cycle. This can be achieved by maintaining a shared memory flag. If this flag is set then archiver should take the fall-back path otherwise it should continue with the fast path. This flag can be set by backend in case if an action like timeline switch, .ready files created out of order,... requires archiver to perform a full directory scan. I have incorporated these changes and updated a new patch. PFA patch v6. Thanks, Dipesh
Commits
-
Reduce overhead of renaming archive status files.
- 756e221db610 16.0 cited
-
Improve performance of pgarch_readyXlog() with many status files.
- beb4e9ba1652 15.0 landed
-
Prioritize history files when archiving
- b981df4cc09a 12.0 cited