Hi Stepan, On Mon, Aug 31, 2026 at 10:21 AM Stepan Filippov wrote: > In general case we use $$ to add pid to temp_path, whereas on windows > we do not use this. I believe, this can cause name collision, which is > not great. > > In documentation we do not specify that archive command needs to be > atomic. Furthermore, we use actual cp as an example. This can lead to > similar problems not only in tests.
Thank you for the review. Both points make sense. In v2, both platforms use the test process PID and the node port. The PID distinguishes parallel tests, and the port distinguishes nodes in one test. There is only one archiver per node, so retries can safely reuse the same temporary path. I also documented that archive commands with concurrent readers should publish complete files atomically, and warned that the simple cp example does not. I did not present the helper's mv -f as a production recipe, because that would contradict the existing requirement not to overwrite a different pre-existing segment. There is a trade-off: every archive command now performs an additional rename. I expect the same-directory rename to be a less frequent source of failures than partial files from an interrupted copy, but only buildfarm experience can confirm that we have not replaced a rare failure mode with a more frequent one. PFA v2. Thank you! Best regards, Andrey Borodin.
v2-0001-Make-test-WAL-archiving-publish-files-atomically.patch
Description: Binary data
