Skip to content

Commit a0efc71

Browse files
committed
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
1 parent 89840d7 commit a0efc71

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contrib/pg_upgrade/option.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ adjust_data_dir(ClusterInfo *cluster)
415415
* so this might fail --- only works for PG 9.2+. If this fails,
416416
* pg_upgrade will fail anyway because the data files will not be found.
417417
*/
418-
snprintf(cmd, sizeof(cmd), "\"%s/postmaster\" -D \"%s\" -C data_directory",
418+
snprintf(cmd, sizeof(cmd), "\"%s/postgres\" -D \"%s\" -C data_directory",
419419
cluster->bindir, cluster->pgconfig);
420420

421421
if ((output = popen(cmd, "r")) == NULL ||

0 commit comments

Comments
 (0)