forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commita9380b5
committed
Fix assorted issues in pg_ctl's pgwin32_CommandLine().
Ensure that the invocation command for postgres or pg_ctl runservicedouble-quotes the executable's pathname; failure to do this leads totrouble when the path contains spaces.Also, ensure that the path ends in ".exe" in both cases and usesbackslashes rather than slashes as directory separators. The latter issueis reported to confuse some third-party tools such as Symantec Backup Exec.Also, rewrite the function to avoid buffer overrun issues by using aPQExpBuffer instead of a fixed-size static buffer. Combinations ofvery long executable pathnames and very long data directory pathnamescould have caused trouble before, for example.Back-patch to all active branches, since this code has been like thisfor a long while.Naoya Anzai and Tom Lane, reviewed by Rajeev Rastogi1 parent360abc0 commita9380b5
1 file changed
+38
-36
lines changedLines changed: 38 additions & 36 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
18 | 18 |
| |
19 | 19 |
| |
20 | 20 |
| |
| 21 | + | |
21 | 22 |
| |
| 23 | + | |
22 | 24 |
| |
23 | 25 |
| |
24 | 26 |
| |
| |||
1239 | 1241 |
| |
1240 | 1242 |
| |
1241 | 1243 |
| |
1242 |
| - | |
| 1244 | + | |
| 1245 | + | |
1243 | 1246 |
| |
1244 | 1247 |
| |
1245 |
| - | |
1246 |
| - | |
1247 |
| - | |
1248 |
| - | |
1249 | 1248 |
| |
1250 | 1249 |
| |
1251 |
| - | |
| 1250 | + | |
1252 | 1251 |
| |
1253 | 1252 |
| |
1254 | 1253 |
| |
| |||
1258 | 1257 |
| |
1259 | 1258 |
| |
1260 | 1259 |
| |
1261 |
| - | |
| 1260 | + | |
1262 | 1261 |
| |
1263 | 1262 |
| |
1264 | 1263 |
| |
| |||
1268 | 1267 |
| |
1269 | 1268 |
| |
1270 | 1269 |
| |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
1271 | 1273 |
| |
1272 |
| - | |
| 1274 | + | |
1273 | 1275 |
| |
1274 |
| - | |
| 1276 | + | |
1275 | 1277 |
| |
1276 |
| - | |
| 1278 | + | |
| 1279 | + | |
1277 | 1280 |
| |
1278 | 1281 |
| |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
1279 | 1296 |
| |
1280 |
| - | |
1281 |
| - | |
1282 |
| - | |
1283 |
| - | |
1284 |
| - | |
1285 |
| - | |
1286 |
| - | |
1287 |
| - | |
1288 |
| - | |
1289 |
| - | |
| 1297 | + | |
| 1298 | + | |
1290 | 1299 |
| |
1291 | 1300 |
| |
1292 |
| - | |
1293 |
| - | |
1294 |
| - | |
1295 |
| - | |
1296 |
| - | |
| 1301 | + | |
1297 | 1302 |
| |
1298 | 1303 |
| |
1299 |
| - | |
| 1304 | + | |
1300 | 1305 |
| |
1301 | 1306 |
| |
1302 |
| - | |
1303 |
| - | |
| 1307 | + | |
1304 | 1308 |
| |
1305 | 1309 |
| |
1306 |
| - | |
| 1310 | + | |
1307 | 1311 |
| |
1308 | 1312 |
| |
1309 | 1313 |
| |
1310 |
| - | |
1311 |
| - | |
1312 |
| - | |
1313 |
| - | |
1314 | 1314 |
| |
1315 |
| - | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
1316 | 1318 |
| |
1317 | 1319 |
| |
1318 |
| - | |
| 1320 | + | |
1319 | 1321 |
| |
1320 | 1322 |
| |
1321 | 1323 |
| |
| |||
1746 | 1748 |
| |
1747 | 1749 |
| |
1748 | 1750 |
| |
1749 |
| - | |
| 1751 | + | |
1750 | 1752 |
| |
1751 | 1753 |
| |
1752 | 1754 |
| |
|
0 commit comments
Comments
(0)