Re: initdb mkdir_p() doesn't work - Mailing list pgsql-hackers

From Tom Lane
Subject Re: initdb mkdir_p() doesn't work
Date
Msg-id 29041.1069617725@sss.pgh.pa.us
Whole thread Raw
In response to Re: initdb mkdir_p() doesn't work  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: initdb mkdir_p() doesn't work  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> Peter Eisentraut wrote:
>> creating directory pg-install/var/data ... initdb: failed

> I will check it out. I know I spent quite some time making sure this 
> worked, but I might have missed something obvious. I wonder if it is 
> platform specific?

AFAICS mkdatadir() shouldn't consider subdir == NULL as a reason to
fail rather than trying mkdir_p.  Indeed, if anything the opposite:
when subdir isn't NULL the immediately prior directory level should
exist already.

I concur with Peter's gripe that a perror() or two wouldn't hurt here.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: initdb mkdir_p() doesn't work
Next
From: Dennis Bjorklund
Date:
Subject: Re: Function parameter names