Re: On file locking

Поиск
Список
Период
Сортировка
От Giles Lean
Тема Re: On file locking
Дата
Msg-id 353.1044223718@nemeton.com.au
обсуждение исходный текст
Ответ на Re: On file locking  (Curt Sampson <cjs@cynic.net>)
Список pgsql-hackers
Curt Sampson <cjs@cynic.net> wrote:

> On Sun, 2 Feb 2003, Tom Lane wrote:
> 
> > This all doesn't look good for using file locks in the way I had in
> > mind :-( ... but considering that all these man pages seem pretty vague,
> > maybe some direct experimentation is called for.
> 
> Definitely. I wonder about the NetBSD manpage quotes in the post you
> followed up to, given that last time I checked flock() was implmented,
> in the kernel, using fcntl(). Either that's changed, or the manpages
> are unclear or lying.

Using the same kernel code != same semantics.

I think the NetBSD manual pages are trying to say that it's "safe" to
have lockf(), fcntl(), and flock() locking playing together.  That
needn't be the case on all operating systems and the standards don't
require it.

> This has been my experience in the past; locking semantics are subtle
> and unclear enough that you really need to test for exactly what you
> want at build time on every system, and you've got to do this testing
> on the filesystem you intend to put the locks on.

What he said ...

Giles


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

Предыдущее
От: Jakub Ouhrabka
Дата:
Сообщение: Re: Case Studio II
Следующее
От: Gavin Sherry
Дата:
Сообщение: Re: Interactive Documentation - how do you want it to