I wanted to try out OpenNMS for monitoring our server infrastructure, and need to install PostgreSQL as described in the Installation manual.
Everything worked as described, except for one item during the installation of PostgreSQL: Trying to execute the command
initdb -E UTF-8 -U postgres ..\data
resulted in the error message
initdb: could not access directory "../data": No such file or directory
It turns out that initdb seems to have a problem with spaces in directory names (“Program Files”). Replacing the path with short filenames (“Program~1”) solves the problem Defining a path without any spaces solves the problem:
initdb -E UTF-8 -U postgres \databases\postgresql\8.3\data
Success!