Thread: Re: [HACKERS] Cannot initdb in cvs tip

Re: [HACKERS] Cannot initdb in cvs tip

From
"Dave Page"
Date:

> -----Original Message-----
> From: Bruce Momjian [mailto:pgman@candle.pha.pa.us]
> Sent: 28 July 2004 09:29
> To: Dave Page
> Cc: Tom Lane; PostgreSQL-development; pgsql-patches@postgresql.org
> Subject: Re: [HACKERS] Cannot initdb in cvs tip
>
>
> Dave, now that we are nearing beta, I think we need to
> correct the initdb problem with removing the directory on
> Win32.  Would you code this up as something that sits in
> /port/dirmod.c and have both initdb and DROP DATABASE call
> the C routine rather than call rm -r/rmdir?  (I think those
> are the only two.  DROP TABLESPACE?)

I'm pretty busy right now and can't guarantee I'll even be able to look
at this until Friday (I spent the last 2 days on pg stuff so need to do
some other things at work :-( ). If anyone has more time please shout,
otherwise I'll get to this as soon as I can.

> I wanted to keep a solution that was as native to the OS as
> possible, but because we can't do that on Win32 and few
> people like the unix system call to 'rm', it is time to clean it up.

Yup.

> One question --- why is there a sleep loop needed for unlink
> in your patch?

I don't know - which leads me nicely onto point out that it's not my
patch :-) I think it was Andrew that orginally wrote it - I just created
the patch to put it back in after it was removed.

Regards, Dave.

Re: [HACKERS] Cannot initdb in cvs tip

From
Andrew Dunstan
Date:

Dave Page wrote:

>
>
>
>
>>-----Original Message-----
>>From: Bruce Momjian [mailto:pgman@candle.pha.pa.us]
>>Sent: 28 July 2004 09:29
>>To: Dave Page
>>Cc: Tom Lane; PostgreSQL-development; pgsql-patches@postgresql.org
>>Subject: Re: [HACKERS] Cannot initdb in cvs tip
>>
>>
>>Dave, now that we are nearing beta, I think we need to
>>correct the initdb problem with removing the directory on
>>Win32.  Would you code this up as something that sits in
>>/port/dirmod.c and have both initdb and DROP DATABASE call
>>the C routine rather than call rm -r/rmdir?  (I think those
>>are the only two.  DROP TABLESPACE?)
>>
>>
>
>I'm pretty busy right now and can't guarantee I'll even be able to look
>at this until Friday (I spent the last 2 days on pg stuff so need to do
>some other things at work :-( ). If anyone has more time please shout,
>otherwise I'll get to this as soon as I can.
>
>
>
>>I wanted to keep a solution that was as native to the OS as
>>possible, but because we can't do that on Win32 and few
>>people like the unix system call to 'rm', it is time to clean it up.
>>
>>
>
>Yup.
>
>
>
>>One question --- why is there a sleep loop needed for unlink
>>in your patch?
>>
>>
>
>I don't know - which leads me nicely onto point out that it's not my
>patch :-) I think it was Andrew that orginally wrote it - I just created
>the patch to put it back in after it was removed.
>
>
>
>

I will try to get a patch out today. IIRC, the Sleep came from the code
I stole from somewhere else - but I will revisit the whole thing.

cheers

andrew