Commit 51e61b0
committed
Ensure pg_ctl behaves sanely when data directory is not specified.
Commit aaa6e1d 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.1 parent bf0945e commit 51e61b0
1 file changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1902 | 1902 | | |
1903 | 1903 | | |
1904 | 1904 | | |
| 1905 | + | |
| 1906 | + | |
| 1907 | + | |
| 1908 | + | |
1905 | 1909 | | |
1906 | 1910 | | |
1907 | 1911 | | |
| |||
2188 | 2192 | | |
2189 | 2193 | | |
2190 | 2194 | | |
| 2195 | + | |
2191 | 2196 | | |
2192 | 2197 | | |
| 2198 | + | |
2193 | 2199 | | |
2194 | 2200 | | |
2195 | 2201 | | |
| |||
0 commit comments