diff --git a/contrib/pg_upgrade/option.c b/contrib/pg_upgrade/option.c
new file mode 100644
index cfc88ec..bd810cd
*** a/contrib/pg_upgrade/option.c
--- b/contrib/pg_upgrade/option.c
*************** adjust_data_dir(ClusterInfo *cluster)
*** 415,421 ****
  	 * 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",
  			 cluster->bindir, cluster->pgconfig);
  
  	if ((output = popen(cmd, "r")) == NULL ||
--- 415,421 ----
  	 * 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/postgres\" -D \"%s\" -C data_directory",
  			 cluster->bindir, cluster->pgconfig);
  
  	if ((output = popen(cmd, "r")) == NULL ||
