Make sure -D is an absolute path when starting server on Windows.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 9aca51250681d2e8d18ed1d73e7cd1283d1cf303
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2014-04-04T22:42:13Z
Releases: 9.4.0
Make sure -D is an absolute path when starting server on Windows.

This is needed because Windows services may get started with a different
current directory than where pg_ctl is executed.  We want relative -D
paths to be interpreted relative to pg_ctl's CWD, similarly to what
happens on other platforms.

In support of this, move the backend's make_absolute_path() function
into src/port/path.c (where it probably should have been long since)
and get rid of the rather inferior version in pg_regress.

Kumar Rajeev Rastogi, reviewed by MauMau

Files

PathChange+/−
src/backend/utils/init/miscinit.c modified +0 −71
src/bin/pg_ctl/pg_ctl.c modified +13 −1
src/include/miscadmin.h modified +0 −1
src/include/port.h modified +1 −0
src/port/path.c modified +110 −1
src/test/regress/pg_regress.c modified +0 −27