aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/cluster.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2013-11-29 18:34:11 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2013-11-29 18:34:11 -0500
commita9380b5c333043fc1ffc342475b3b1f2c021e962 (patch)
treebcaa59d41d0ecfd1a34d491e906e63241e78731b /src/backend/commands/cluster.c
parent360abc0a5be64b01050a9d7144158890236487b5 (diff)
downloadpostgresql-a9380b5c333043fc1ffc342475b3b1f2c021e962.tar.gz
postgresql-a9380b5c333043fc1ffc342475b3b1f2c021e962.zip
Fix assorted issues in pg_ctl's pgwin32_CommandLine().
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
Diffstat (limited to 'src/backend/commands/cluster.c')
0 files changed, 0 insertions, 0 deletions