standby clone: various clarifications for --replication-conf-only option

In particular, the emitted HINT was not really appropriate for Pg13 and
later.
This commit is contained in:
Ian Barwick
2020-11-17 09:58:51 +09:00
parent 040b1ae4e3
commit 9c04de11fc
2 changed files with 32 additions and 8 deletions

View File

@@ -1453,7 +1453,18 @@ _do_create_replication_conf(void)
if (node_is_running == true)
{
log_hint(_("node must be restarted for the new file to take effect"));
if (PQserverVersion(upstream_conn) >= 130000)
{
log_hint(_("configuration must be reloaded for the configuration changes to take effect"));
}
else if (PQserverVersion(upstream_conn) >= 120000)
{
log_hint(_("node must be restarted for the configuration changes to take effect"));
}
else
{
log_hint(_("node must be restarted for the new file to take effect"));
}
}
}
}