-
Notifications
You must be signed in to change notification settings - Fork 212
Add --if-not-exists flag to receive-wal #1065
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
base: master
Are you sure you want to change the base?
Conversation
I'm antonag32 but ended up doing this outside work hours so I'm using my personal account. Let me know if I have to make any changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's missing documentation for this new option.
Not 100% sure of this, but maybe we want to think about adding this as an option to barman.conf as well,
Added the new flag to the RST docs. |
barman/server.py
Outdated
args = "Replication slot '%s' already exists", self.config.slot_name | ||
if ignore_duplicate: | ||
output.info(*args) | ||
else: | ||
output.error(*args) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regarding the output message and how it's being set here. I would prefer a slightly different message when the user accepts the existing slot without failing than when it doesn't.
Also, follow the same process for calling the output module as in other parts of the code, meaning, don't pass a variable where you store the message string, but rather have the string be formatted when calling info()
or error()
methods.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Went ahead and changed the message so what happened is more clear to the user. Let me know what you think.
This flag prevents `receive-wal` from exiting with an error when a slot with the same name already exists. This is the same behavior as calling `pg_receivewal` with the same flag. References: EnterpriseDB#1049.
f96db2d
to
70102b2
Compare
This flag prevents
receive-wal
from exiting with an error when a slot with the same name already exists. This is the same behavior as callingpg_receivewal
with the same flag.References: #1049.