Re: FW: getting a crash during initdb - Mailing list pgsql-hackers

From Merlin Moncure
Subject Re: FW: getting a crash during initdb
Date
Msg-id 6EE64EF3AB31D5448D0007DD34EEB34101ADDF@Herge.rcsinc.local
Whole thread Raw
In response to FW: getting a crash during initdb  ("Merlin Moncure" <merlin.moncure@rcsonline.com>)
List pgsql-hackers
Bruce Momjian wrote:
> 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:

Yes, you are correct, I was jumping to conclusions.  What's really
strange is now initdb is properly cleaning up the folders.  I examined
my previous logs and apparently the value of rmtopdir parameter to
rmtree was wrong...
Note my previous initdb log said removing contents of ... (now says
removing ...)


Some more checking turns out it is all hooking on the return val of
check_data_dir...perhaps the condition was hooking if I had the folder
open in another window...so no worries there.  Still having the problems
with initdb.

Merlin


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Thread code not vpath-safe
Next
From: Josh Berkus
Date:
Subject: Re: Usability, MySQL, Postgresql.org, gborg, contrib, etc.