You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Concurrent wal archiving in wal-push scans archive_status .ready files and uploads up to the --pool-size number wal segments per call of wal-push. For each segment uploaded this way it renames the corresponding .ready file to .done, which causes postgres to skip calling archive_command on these wal segments. If wal-push is being run with --pool-size > 1 (default is 32 for wal-push) side-by-side with another archive command (e.g. archive_command is a script that calls both) this will result in data loss in the archive destination of the other command.
help='Set the maximum number of concurrent transfers')
wal-g supports similar behavior but disables it by default for this very reason wal-g/wal-g#950 (comment) (requires --pg-ready-rename to enable)
It would be nice if there was a prominent warning in the README and docs that wal-push with --pool-size > 1 is not safe to use with an archive command that e.g. is a script that calls multiple archivers and returns successfully if and only if all succeed.
The text was updated successfully, but these errors were encountered:
Concurrent wal archiving in wal-push scans archive_status
.ready
files and uploads up to the--pool-size
number wal segments per call of wal-push. For each segment uploaded this way it renames the corresponding.ready
file to.done
, which causes postgres to skip calling archive_command on these wal segments. If wal-push is being run with--pool-size
> 1 (default is 32 for wal-push) side-by-side with another archive command (e.g. archive_command is a script that calls both) this will result in data loss in the archive destination of the other command.This mailing list thread goes into some more details about issues with archive commands modifying the contents of archive_status: https://www.postgresql.org/message-id/flat/[email protected]
relevant code path
wal-e/wal_e/cmd.py
Lines 657 to 660 in f5b3e79
wal-e/wal_e/operator/backup.py
Lines 266 to 291 in f5b3e79
wal-e/wal_e/worker/pg/wal_transfer.py
Lines 67 to 87 in f5b3e79
wal-e/wal_e/worker/pg/wal_transfer.py
Lines 182 to 183 in f5b3e79
wal-e/wal_e/worker/pg/wal_transfer.py
Lines 30 to 49 in f5b3e79
The default concurrency is set to 32, so this is the behavior with default settings:
wal-e/wal_e/cmd.py
Lines 288 to 290 in f5b3e79
wal-g supports similar behavior but disables it by default for this very reason wal-g/wal-g#950 (comment) (requires
--pg-ready-rename
to enable)It would be nice if there was a prominent warning in the README and docs that wal-push with
--pool-size
> 1 is not safe to use with an archive command that e.g. is a script that calls multiple archivers and returns successfully if and only if all succeed.The text was updated successfully, but these errors were encountered: