Use actual program name rather than "repmgr" when executing remote commands

It's possible some distribution packages may assign a different name to the
"repmgr" binary (typically appending a version number), so we shouldn't hard-code
into the command string.

However it's reasonable to assume the "repmgr" binary will have the same name
across a replication cluster so we won't engage in any contortions to account
for possible variations.

See: https://github.com/2ndQuadrant/repmgr/issues/323
This commit is contained in:
Ian Barwick
2017-08-31 11:00:48 +09:00
parent ae634100a3
commit 705b52fde4

View File

@@ -2796,7 +2796,7 @@ make_remote_repmgr_path(PQExpBufferData *output_buf, t_node_info *remote_node_re
{
appendPQExpBuffer(output_buf,
"%s -f %s ",
make_pg_path("repmgr"),
make_pg_path(progname()),
remote_node_record->config_file);
}