Ensure pg_ctl behaves sanely when data directory is not specified.
Ensure pg_ctl behaves sanely when data directory is not specified.

Commit aaa6e1def292cdacb6b27088898793b1b879fedf introduced multiple hazards
in the case where pg_ctl is executed with neither a -D switch nor any
PGDATA environment variable.  It would dump core on machines which are
unforgiving about printf("%s", NULL), or failing that possibly give a
rather unhelpful complaint about being unable to execute "postgres -C",
rather than the logically prior complaint about not being told where the
data directory is.

Edmund Horner's report suggests that there is another, Windows-specific
hazard here, but I'm not the person to fix that; it would in any case only
be significant when trying to use a config-only PGDATA pointer.

ashwinstar/gpdb,lisakowen/gpdb,oberstet/postgres-xl,arcivanov/postgres-xl,greenplum-db/gpdb,lisakowen/gpdb,xinzweb/gpdb,adam8157/gpdb,Postgres-XL/Postgres-XL,jmcatamney/gpdb,ovr/postgres-xl,jmcatamney/gpdb,oberstet/postgres-xl,arcivanov/postgres-xl,greenplum-db/gpdb,techdragon/Postgres-XL,ashwinstar/gpdb,pavanvd/postgres-xl,greenplum-db/gpdb,postmind-net/postgres-xl,ovr/postgres-xl,jmcatamney/gpdb,postmind-net/postgres-xl,xinzweb/gpdb,arcivanov/postgres-xl,yazun/postgres-xl,zeroae/postgres-xl,kmjungersen/PostgresXL,ashwinstar/gpdb,adam8157/gpdb,50wu/gpdb,yazun/postgres-xl,greenplum-db/gpdb,techdragon/Postgres-XL,lisakowen/gpdb,postmind-net/postgres-xl,pavanvd/postgres-xl,ashwinstar/gpdb,adam8157/gpdb,zeroae/postgres-xl,50wu/gpdb,50wu/gpdb,xinzweb/gpdb,postmind-net/postgres-xl,adam8157/gpdb,techdragon/Postgres-XL,snaga/postgres-xl,zeroae/postgres-xl,techdragon/Postgres-XL,ashwinstar/gpdb,lisakowen/gpdb,adam8157/gpdb,zeroae/postgres-xl,snaga/postgres-xl,pavanvd/postgres-xl,arcivanov/postgres-xl,lisakowen/gpdb,ovr/postgres-xl,lisakowen/gpdb,xinzweb/gpdb,adam8157/gpdb,xinzweb/gpdb,pavanvd/postgres-xl,adam8157/gpdb,yazun/postgres-xl,postmind-net/postgres-xl,xinzweb/gpdb,oberstet/postgres-xl,50wu/gpdb,50wu/gpdb,Postgres-XL/Postgres-XL,greenplum-db/gpdb,ashwinstar/gpdb,50wu/gpdb,jmcatamney/gpdb,yazun/postgres-xl,oberstet/postgres-xl,jmcatamney/gpdb,kmjungersen/PostgresXL,snaga/postgres-xl,jmcatamney/gpdb,ashwinstar/gpdb,arcivanov/postgres-xl,50wu/gpdb,jmcatamney/gpdb,oberstet/postgres-xl,snaga/postgres-xl,yazun/postgres-xl,snaga/postgres-xl,zeroae/postgres-xl,kmjungersen/PostgresXL,xinzweb/gpdb,Postgres-XL/Postgres-XL,xinzweb/gpdb,Postgres-XL/Postgres-XL,kmjungersen/PostgresXL,ovr/postgres-xl,Postgres-XL/Postgres-XL,lisakowen/gpdb,greenplum-db/gpdb,arcivanov/postgres-xl,techdragon/Postgres-XL,50wu/gpdb,greenplum-db/gpdb,adam8157/gpdb,pavanvd/postgres-xl,kmjungersen/PostgresXL,lisakowen/gpdb,greenplum-db/gpdb,jmcatamney/gpdb,ovr/postgres-xl,ashwinstar/gpdb