From a0efc714531d3dfd02fafd39e80d058cef6703b0 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Wed, 1 Apr 2015 18:25:45 -0400 Subject: [PATCH] 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 --- contrib/pg_upgrade/option.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ||