aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2021-03-02 15:39:34 -0300
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2021-03-02 15:39:34 -0300
commit926139dd04bb77ad3c18c9c69544104d15f69672 (patch)
treea5622e2a617df2eca5e1656088e0fa870bd7b28a
parent8386f5840ac08a70a649abc80679ad7c2127b7d7 (diff)
downloadpostgresql-926139dd04bb77ad3c18c9c69544104d15f69672.tar.gz
postgresql-926139dd04bb77ad3c18c9c69544104d15f69672.zip
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
-rw-r--r--src/bin/initdb/initdb.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c
index 1b25b89394d..63da5d29b39 100644
--- a/src/bin/initdb/initdb.c
+++ b/src/bin/initdb/initdb.c
@@ -3255,6 +3255,9 @@ main(int argc, char *argv[])
/* ... and tag on pg_ctl instead */
join_path_components(pg_ctl_path, pg_ctl_path, "pg_ctl");
+ /* Convert the path to use native separators */
+ make_native_path(pg_ctl_path);
+
/* path to pg_ctl, properly quoted */
appendShellString(start_db_cmd, pg_ctl_path);