pg_probackup
pg_probackup copied to clipboard
Incorrect documentation about add-instance of remote-options
The documentation says:
If you run this command with the remote_options, the specified parameters will be added to pg_probackup.conf.
However, it doesn't write to pg_probackup.conf, and the source code is here, it says do not save remote options into config:
/* Kludge: do not save remote options into config */
config_set_opt(instance_options, &instance_config.remote.host,
SOURCE_DEFAULT);
config_set_opt(instance_options, &instance_config.remote.proto,
SOURCE_DEFAULT);
config_set_opt(instance_options, &instance_config.remote.port,
SOURCE_DEFAULT);
config_set_opt(instance_options, &instance_config.remote.path,
SOURCE_DEFAULT);
config_set_opt(instance_options, &instance_config.remote.user,
SOURCE_DEFAULT);
config_set_opt(instance_options, &instance_config.remote.ssh_options,
SOURCE_DEFAULT);
config_set_opt(instance_options, &instance_config.remote.ssh_config,
SOURCE_DEFAULT);
I'm a bit confused. Which is right? Should we update the documentation, or fix the code to follow the documentation?
BTY, why we cannot save remote options into config?
Hello! It is a documentation bug. Originally we were setting remote parameters in instance config during add-instance execution, but some users found this behavior to be confusing, because it is kinda implicit. We changed it, but looks like forgot to change documentation, thank you for pointing that out.
Hi, @gsmol, I found the documentation do not update, here is a patch to fix the problem.
diff --git a/doc/pgprobackup.xml b/doc/pgprobackup.xml
index 2cb10e37..11e49b88 100644
--- a/doc/pgprobackup.xml
+++ b/doc/pgprobackup.xml
@@ -569,10 +569,7 @@ pg_probackup add-instance -B <replaceable>backup_dir</replaceable> -D <replaceab
the backup catalog. The
<filename>backups/<replaceable>instance_name</replaceable></filename> directory contains
the <filename>pg_probackup.conf</filename> configuration file that controls
- <application>pg_probackup</application> settings for this backup instance. If you run this
- command with the
- <link linkend="pbk-remote-server-opts">remote_options</link>, the specified
- parameters will be added to <filename>pg_probackup.conf</filename>.
+ <application>pg_probackup</application> settings for this backup instance.
</para>
<para>
For details on how to fine-tune <application>pg_probackup</application> configuration, see
Any thoughts?
Hello, I added a patch to rel_2_5, I'm closing the issue