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

Support custom values for recovery options when running barman recover #956

Open
barthisrael opened this issue Jul 3, 2024 · 1 comment

Comments

@barthisrael
Copy link
Contributor

Context

This issue has been created based on inputs provided through #881 .

With the current implementation, Barman generates recovery configuration for the user through postgresql.auto.conf.

While the parameters inferred by Barman might fit well in most scenarios, there are cases where the user might want to override the values provided by Barman, e.g. override the default restore_command generated by Barman.

Objective

The objective of this ticket is to provide means for the user to override recovery options when executing barman recover command. That way, if the users want to override any of the values provided by Barman to postgresql.auto.conf they would be able to do that on their own risk.

One idea for implementing that would be:

  1. Expose a new --pg-recovery-option command-line argument for barman recover
    It could be specified multiple times, following the pattern GUC=value
  2. For every GUC specified through --pg-recovery-option, replace the value that wold be set by Barman with the custom value
@JP95Git
Copy link

JP95Git commented Jul 3, 2024

Thanks for the issue.

Another idea: In repmgr you can define custom commands e.g. for starting PostgreSQL. Search for "service_start_command" in the documentation:
https://www.repmgr.org/docs/current/configuration-file-service-commands.html

Perhaps we could add a new setting in barman like
custom_restore_command = '/path/to/barman/bin/barman --config /path/to/config/barman.conf get-wal -P localhost %f > %p'
If this setting exists barman would use the given command, if the setting is missing barman would use the existing strategy to create the restore_command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants