On Feb 3, 2006, at 6:40 AM, Deepak Kaul wrote:
At http://www.sqlite.org/lockingv3.html in section 6.0 How To Corrupt Your Database Files it states the following...

"POSIX advisory locking is known to be buggy or even unimplemented on many NFS implementations (including recent versions of Mac OS X) and that there are reports of locking problems for network filesystems under windows. Your best defense is to not use SQLite for files on a network filesystem."

Is this still true with MacOSX 10.4? How anyone successfully run sqlite on an nfs mount?

Thanks in advance.


On Mac OS X 10.4's version of SQLite, the targeted filesystem type is
interrogated on sqlite3_open() to determine what kind of locking is
approrpriate.  For HFS+ or UFS, the regular BSD style advisory locks
are used.  For other filesystems, including NFS, the locking
mechanism reverts to using .lock files.   As a side effect, it also
causes SQLite to no longer use a shared lock -- every read implies an
exclusive lock.

Ineffecient, yes.  But it works.

NFS implementations do support advisory locks, but the
implementations are often buggy and/or incomplete.   As a result,
Apple went with a conservative implementation.

Given the changes in SQLite's locking support in recent versions, the
modifications that Apple made are [thankfully] no longer entirely
appropriate.   It is likely that a better solution will be found and
the results of said work will be posted back at some time in the future.

b.bum

Reply via email to