Re: Cannot initdb in cvs tip

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: Cannot initdb in cvs tip
Дата
Msg-id 4107B6B2.3080801@dunslane.net
обсуждение исходный текст
Ответ на Re: Cannot initdb in cvs tip  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: Cannot initdb in cvs tip
Re: Cannot initdb in cvs tip
Список pgsql-hackers

Bruce Momjian wrote:

>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?)
>
>

The small wrinkle here is that rmtree needs to make a copy of the file
names before it starts removing things. In the backend case that means
calling palloc() and friends - am I correct in assuming it is reasonable
to do this in whatever context happens to be current when rmtree is
called? (I promise to make it clean up nicely).

>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.
>
>One question --- why is there a sleep loop needed for unlink in your
>patch?
>
>
>
>

We will just be calling the existing pgunlink() (which has a sleep) in
the Windows cases, so this question becomes moot.

cheers

andrew

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [BUGS] casting strings to multidimensional arrays yields strange results
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Cannot initdb in cvs tip