Re: 8.3 .4 + Vista + MingW + initdb = ACCESS_DENIED

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: 8.3 .4 + Vista + MingW + initdb = ACCESS_DENIED
Дата
Msg-id 48F61455.1020009@dunslane.net
обсуждение исходный текст
Ответ на Re: 8.3 .4 + Vista + MingW + initdb = ACCESS_DENIED  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: 8.3 .4 + Vista + MingW + initdb = ACCESS_DENIED  (Alvaro Herrera <alvherre@commandprompt.com>)
Re: 8.3 .4 + Vista + MingW + initdb = ACCESS_DENIED  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers

Andrew Dunstan wrote:
>
>
> Dave Page wrote:
>>> The reason it should be in the Global namespace is that shmem is one 
>>> part of
>>> detecting an existing postmaster. Especially in situations where the 
>>> db is started
>>> by hand, the protection against duplicate startup is important.
>>>     
>>
>> Yeah, as Magnus reminded me.
>>   
>
> IMNSHO we need to find a different exclusion mechanism that isn't as 
> cumbersome and surrounded by caveats as this one.
>
> The buildfarm also uses an exclusion mechanism, based on Perl's 
> flock(), and it's a simple one line call. AFAIK that works just fine 
> on Windows (I will double check). If so, we should possibly look at 
> how Perl does that on Windows.

I have verified that it does indeed work. Underneath the hood it uses 
the native call LockFileEx() see win32io.c in Perl source. I suggest we 
should switch from this flaky use of Global namespace to having the 
postmaster acquire an explicit lock on a file in the datadir.

cheers

andrew





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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Is autovacuum too noisy about orphan temp tables?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Annoying error messages in _dosmaperr