Re: Win32 rename()/unlink() questions

Поиск
Список
Период
Сортировка
От Mike Mascari
Тема Re: Win32 rename()/unlink() questions
Дата
Msg-id 3D8AB39B.80708@mascari.com
обсуждение исходный текст
Ответ на Re: Win32 rename()/unlink() questions  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: Win32 rename()/unlink() questions  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Список pgsql-hackers
Bruce Momjian wrote:
> Mike Mascari wrote:
> 
>>Actually, looking at the pg_pwd code, you want to determine a 
>>way for:
>>
>>1. Process 1 opens "foo"
>>2. Process 2 opens "foo"
>>3. Process 1 creates "bar"
>>4. Process 1 renames "bar" to "foo"
>>5. Process 2 can continue to read data from the open file handle 
>>and get the original "foo" data.
> 
> 
> Yep, that's it.
> 

So far, MoveFileEx("foo", "bar", MOVEFILE_REPLACE_EXISTING) 
returns "Access Denied" when Process 1 attempts the rename. But 
I'm continuing to investigate the possibilities...

Mike Mascari
mascarm@mascari.com






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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Win32 rename()/unlink() questions
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: Win32 rename()/unlink() questions