Re: Feature: POSIX Shared memory support
От | Andrew Dunstan |
---|---|
Тема | Re: Feature: POSIX Shared memory support |
Дата | |
Msg-id | 61714.24.211.165.134.1170833233.squirrel@www.dunslane.net обсуждение исходный текст |
Ответ на | Re: Feature: POSIX Shared memory support (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Feature: POSIX Shared memory support
Re: Feature: POSIX Shared memory support |
Список | pgsql-patches |
Tom Lane wrote: > > We've speculated on occasion about using file locking in some form as a > substitute mechanism for detecting this, but that seems to just bring > its own set of not-too-portable assumptions. > Maybe we should look some more at that. Use of file locking was one thought I had today after I saw Tom's earlier comments. Perl provides a moderately portable flock(), which we use in fact in buildfarm to stop it from running more than one at a time on a given repo copy. The Perl description starts thus: Calls flock(2), or an emulation of it, on FILEHANDLE. Returns true for success, false on failure. Produces a fatal error if used on a machine that doesn't implement flock(2), fcntl(2) locking, or lockf(3). "flock" is Perl's portable file locking interface, although it locks only entire files, not records. Note that this means it works on every platform that has ever reported on buildfarm. Maybe we can borrow some code. cheers andrew
В списке pgsql-patches по дате отправления: