Re: rmtree() failure on Windows

Поиск
Список
Период
Сортировка
От Reini Urban
Тема Re: rmtree() failure on Windows
Дата
Msg-id 417D294A.1030106@x-ray.at
обсуждение исходный текст
Ответ на Re: rmtree() failure on Windows  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane schrieb:
> Andrew Dunstan <andrew@dunslane.net> writes:
>>Shown below is an extract from the traces of make installcheck in 
>>contrib. It is decorated with some extra traces I built into 
>>src/port/dirmod.c::rmtree(). It shows quite reproducible failure of 
>>rmtree(), mostly at the rmdir calls, but even more worryingly there are 
>>consistent unlink failures also.
> 
> 
> I kinda suspect that what you are looking at is a problem with the
> delayed-unlinking feature that we built to cope with Windows' inability
> to unlink open files, ie, it's being a little too slow to do the
> unlinks.  Would you refresh my memory about exactly where and when the
> unlink happens if the initial try fails?

You can have a look into the cygwin sources how we do that :)
kinda problematic.

http://sources.redhat.com/cgi-bin/cvsweb.cgi/winsup/cygwin/delqueue.cc?cvsroot=uberbaum
http://sources.redhat.com/cgi-bin/cvsweb.cgi/winsup/cygwin/syscalls.cc?cvsroot=uberbaum

in short:
if the return status of DeleteFileA() is ERROR_SHARING_VIOLATION, defer 
deletion until the end of the process.
but win95 reports ERROR_ACCESS_DENIED and not ERROR_SHARING_VIOLATION as 
NT does.

-- 
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/


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

Предыдущее
От: Fabien COELHO
Дата:
Сообщение: Re: Using ALTER TABLESPACE in pg_dump
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: timestamp with time zone a la sql99