On Wed, 28 Feb 2018 14:12:39 -0500 Rui DeSousa <rui.desousa@xxxxxxxxxx> wrote: > You are dealing with a race condition. Postgres will continually > attempt to archive the same file over and over until rsync foolishly > returns success. What do you mean by "rsync foolishly returns success"? > You are making the assumption that rsync removed the file? Rsync does not create the file with the final name until it has successfully transferred it completely. It copies it to a temporary file and then if (and only if) the transfer succeeded, then it atomically renames the temporary file to the final filename. The only failure mode if metadata updates are lost is that the file will appear not to exist when it really should, not the other way around. You can never, ever have the file existing with the proper filename until a transfer has succeeded. However, see my other post about a test. The -c option doesn't actually help if a file changes while rsync is running. Regards, Dianne.