From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Merlin Moncure <merlin(dot)moncure(at)rcsonline(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org, Andrew Dunstan <andrew(at)dunslane(dot)net>, psql-hackers-win32(at)postgresql(dot)org |
Subject: | Re: FW: getting a crash during initdb |
Date: | 2004-04-26 18:28:31 |
Message-ID: | 200404261828.i3QISVW15997@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Merlin Moncure wrote:
> > > I'll check why the rmdir command is not working as expected.
> >
> > I just poked around and couldn't figure out the cause. Initdb should
> > either remove the directory if it created it, or remove everything
> _in_
> > the directory if the directory already existed. I tried the rmdir/del
> > /s /q commands in a CMD window and it worked fine.
>
> Problem is backslash issue :) initdb is issuing del /s /q
> "c:/postgres/data".
>
> Is there a library command to properly resolve slashes?
Uh, I just testd this using CMD and it worked:
rmdir /s /q "C:/TMP/TMP"
The quotes are required, but are in the code:
snprintf(buf, sizeof(buf), "%s /s /q \"%s\"",
rmtopdir ? "rmdir" : "del", path);
However, I have no problem with pulling his rmdir C code back out of CVS
and implementing it. I think it might come in as part of tablespaces
anyway so I was just waiting to see how things shook out. If we do it,
it would go into /port along with copdir/dp for directories.
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From | Date | Subject | |
---|---|---|---|
Next Message | pgsql | 2004-04-26 18:30:07 | Re: Usability, MySQL, Postgresql.org, gborg, contrib, |
Previous Message | Merlin Moncure | 2004-04-26 18:05:10 | Re: FW: getting a crash during initdb |