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-24 00:04:48 |
Message-ID: | 418.1069632288@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:
> Tom Lane wrote:
>> AFAICS mkdatadir() shouldn't consider subdir == NULL as a reason to
>> fail rather than trying mkdir_p.
> Right. In fact, I can't see any good reason to call mkdir and then
> mkdir_p at all. See my patch from this afternoon.
I'm unsure about that. I liked the original idea of only trying mkdir_p
when plain mkdir() had failed with ENOENT. I am not convinced your
proposed patch will behave desirably under all error cases. In
particular, mkdir_p seems rather dependent on knowing just which errno
codes will get returned --- which is okay for its heritage as BSD-only
code, but how well will it port? Better to only invoke it when we have
reason to think it can help.
> Sure. Of course, the reason I put this on my web site and asked for
> eyeballs was to try to catch some of this sort of stuff before the
> program went into the tree :-)
We have a whole development cycle to shake these issues out. Don't
panic.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2003-11-24 00:22:19 | Re: Executable files in CVS |
Previous Message | Tom Lane | 2003-11-23 23:59:45 | Re: Executable files in CVS |
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2003-11-24 01:16:29 | Re: initdb mkdir_p() doesn't work |
Previous Message | Peter Eisentraut | 2003-11-23 21:43:24 | Re: internationalization of initdb |