Thread: BUG #5860: initdb failing with could not create directory "C:/Program Files ": File exists error

The following bug has been logged online:

Bug reference:      5860
Logged by:          Yuvachitra
Email address:      yuvachitra@gmail.com
PostgreSQL version: 8.3/ 9.0
Operating system:   Windows 2003
Description:        initdb failing with could not create directory
"C:/Program Files ": File exists error
Details:

Hi,

On executing the initdb.exe by passing the data folder location, i get an
error saying initdb: could not create directory "C:/Program Files": File
exists.

But as mentioned in
http://archives.postgresql.org/pgsql-bugs/2008-06/msg00169.php, the
workaround works fine.

Please let us know if this workaround works in all scenarios. Also, it would
be grateful if we get to know root cause of the issue.

Thanks
Yuva