From: Bruce Momjian Date: Wed, 1 Apr 2015 22:25:45 +0000 (-0400) Subject: pg_upgrade: call 'postgres' binary to get data directory location X-Git-Tag: REL9_5_ALPHA1~514 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a0efc714531d3dfd02fafd39e80d058cef6703b0;p=postgresql 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 --- diff --git a/contrib/pg_upgrade/option.c b/contrib/pg_upgrade/option.c index 9b387be21d..742d133e39 100644 --- a/contrib/pg_upgrade/option.c +++ b/contrib/pg_upgrade/option.c @@ -415,7 +415,7 @@ adjust_data_dir(ClusterInfo *cluster) * 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. */ - 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); if ((output = popen(cmd, "r")) == NULL ||