Commit a0efc714 authored by Bruce Momjian's avatar Bruce Momjian

pg_upgrade: call 'postgres' binary to get data directory location

This matches the binary 'pg_ctl' calls.  Previously we called the
'postmaster'.

Report by Christoph Berg
parent 89840d7d
...@@ -415,7 +415,7 @@ adjust_data_dir(ClusterInfo *cluster) ...@@ -415,7 +415,7 @@ adjust_data_dir(ClusterInfo *cluster)
* so this might fail --- only works for PG 9.2+. If this fails, * so this might fail --- only works for PG 9.2+. If this fails,
* pg_upgrade will fail anyway because the data files will not be found. * pg_upgrade will fail anyway because the data files will not be found.
*/ */
snprintf(cmd, sizeof(cmd), "\"%s/postmaster\" -D \"%s\" -C data_directory", snprintf(cmd, sizeof(cmd), "\"%s/postgres\" -D \"%s\" -C data_directory",
cluster->bindir, cluster->pgconfig); cluster->bindir, cluster->pgconfig);
if ((output = popen(cmd, "r")) == NULL || if ((output = popen(cmd, "r")) == NULL ||
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment