Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Qocument compression issues with barman-cloud-wal-archive and older python versions #369

Merged

Conversation

mikewallace1979
Copy link
Contributor

@mikewallace1979 mikewallace1979 commented Jul 27, 2021

Adds warnings around using --gzip and --bzip2 on barman-cloud-wal-archive for older python versions due to issue #325.

I stopped short of automatically refusing to run with those options on affected python versions because it's possible someone might want to archive WALs from an old machine running python 2 and restore onto a newer machine running a current python 3 - such a scenario would not be affected by issue #325 at all and would work correctly.

Updates the barman-cloud-wal-archive man page and the argument
help strings to warn people that compression options should not be
used with older python versions (<3.2 for gzip, 3.3 for bzip2).

See issue #325 for the full context.
@amenonsen
Copy link
Contributor

I had initially thought that we should warn people who try to restore compressed WAL with python 2.7 and tell them to use 3.x instead (for the restore). There's some sense to warning them against getting into the situation to begin with… but I'll think about this a little more.

@mikewallace1979
Copy link
Contributor Author

I had initially thought that we should warn people who try to restore compressed WAL with python 2.7 and tell them to use 3.x instead (for the restore). There's some sense to warning them against getting into the situation to begin with… but I'll think about this a little more.

Warning on restore makes a lot of sense - we could check for python 2 once we have determined whether compression is involved, e.g. after finding the WAL file and exit with a "use Python 3.x" message there.

Detects when barman-cloud-wal-restore is attempting to restore a
compressed WAL on python 2.x and returns an error message telling
the user to upgrade to a supported python 3.x.

See issue #325
@mikewallace1979
Copy link
Contributor Author

@amenonsen Added a commit to error cleanly if restoring compressed WALs on python 2

@amenonsen amenonsen merged commit 2f41746 into master Aug 5, 2021
@amenonsen amenonsen deleted the dev/325-document-wal-archive-compression-issues-with-python2 branch August 5, 2021 02:55
@amenonsen amenonsen changed the title Document compression issues with barman-cloud-wal-archive and older python versions Qocument compression issues with barman-cloud-wal-archive and older python versions Aug 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants