Re: initdb mkdir_p() doesn't work

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: initdb mkdir_p() doesn't work
Date: 2003-11-23 20:02:05
Message-ID: 29041.1069617725@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Andrew Dunstan <andrew(at)dunslane(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dennis Bjorklund 2003-11-23 20:09:23 Re: Function parameter names
Previous Message Andrew Dunstan 2003-11-23 19:57:16 Re: [HACKERS] initdb mkdir_p() doesn't work

Browse pgsql-patches by date

  From Date Subject
Next Message Andrew Dunstan 2003-11-23 21:35:24 Re: initdb mkdir_p() doesn't work
Previous Message Andrew Dunstan 2003-11-23 19:57:16 Re: [HACKERS] initdb mkdir_p() doesn't work