Skip to content

Commit 75dbfe4

Browse files
committed
Use native path separators to pg_ctl in initdb
On Windows, CMD.EXE allegedly does not run a command that uses forward slashes, so let's convert the path to use backslashes instead. Backpatch to 10. Author: Nitin Jadhav <nitinjadhavpostgres@gmail.com> Reviewed-by: Juan José Santamaría Flecha <juanjo.santamaria@gmail.com> Discussion: https://postgr.es/m/CAMm1aWaNDuaPYFYMAqDeJrZmPtNvLcJRS++CcZWY8LT6KcoBZw@mail.gmail.com
1 parent 4604f83 commit 75dbfe4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/bin/initdb/initdb.c

+3
Original file line numberDiff line numberDiff line change
@@ -3239,6 +3239,9 @@ main(int argc, char *argv[])
32393239
/* ... and tag on pg_ctl instead */
32403240
join_path_components(pg_ctl_path, pg_ctl_path, "pg_ctl");
32413241

3242+
/* Convert the path to use native separators */
3243+
make_native_path(pg_ctl_path);
3244+
32423245
/* path to pg_ctl, properly quoted */
32433246
appendShellString(start_db_cmd, pg_ctl_path);
32443247

0 commit comments

Comments
 (0)