Skip to content

Commit f927767

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 0f1b0c0 commit f927767

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/bin/initdb/initdb.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3350,6 +3350,9 @@ main(int argc, char *argv[])
33503350
/* ... and tag on pg_ctl instead */
33513351
join_path_components(pg_ctl_path, pg_ctl_path, "pg_ctl");
33523352

3353+
/* Convert the path to use native separators */
3354+
make_native_path(pg_ctl_path);
3355+
33533356
/* path to pg_ctl, properly quoted */
33543357
appendShellString(start_db_cmd, pg_ctl_path);
33553358

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy