Revision 8c72b20e39a2f6e788020f9c6750e2c0a9bbb235 authored by Tom Lane on 29 November 2013, 23:34:18 UTC, committed by Tom Lane on 29 November 2013, 23:34:18 UTC
Ensure that the invocation command for postgres or pg_ctl runservice
double-quotes the executable's pathname; failure to do this leads to
trouble when the path contains spaces.

Also, ensure that the path ends in ".exe" in both cases and uses
backslashes rather than slashes as directory separators.  The latter issue
is reported to confuse some third-party tools such as Symantec Backup Exec.

Also, rewrite the function to avoid buffer overrun issues by using a
PQExpBuffer instead of a fixed-size static buffer.  Combinations of
very long executable pathnames and very long data directory pathnames
could have caused trouble before, for example.

Back-patch to all active branches, since this code has been like this
for a long while.

Naoya Anzai and Tom Lane, reviewed by Rajeev Rastogi
1 parent bf0d21e
History
File Mode Size
config
contrib
doc
src
.gitignore -rw-r--r-- 360 bytes
COPYRIGHT -rw-r--r-- 1.2 KB
GNUmakefile.in -rw-r--r-- 3.7 KB
Makefile -rw-r--r-- 1.5 KB
README -rw-r--r-- 1.3 KB
README.git -rw-r--r-- 816 bytes
aclocal.m4 -rw-r--r-- 385 bytes
configure -rwxr-xr-x 850.2 KB
configure.in -rw-r--r-- 62.7 KB

README

back to top