Hi,

Our application is a simple desktop application with a simple install and run 
setup. It is not possible to tell users to apply workaround of sharing the 
drive via SMB etc.
I was hoping we have a way to enable dot file locking. For Mac OS X, sqlite 
allows SQLITE_ENABLE_LOCKING_STYLE compile option, why not leverage that for 
NFS issues too?
May be I am completely wrong, but I feel dot file locking may work as long as 
file read/write/execute permissions are available.

Switching SQLITE_ENABLE_LOCKING_STYLE on RHEL resulted in compile errors. There 
is no configure option but by setting CFLAGS, CCFLAGS I tried compile sqlite 
with this option.
  

Regards,

________________________________________
From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] On 
Behalf Of Simon Slavin [slav...@bigfraud.org]
Sent: Sunday, June 13, 2010 10:38 PM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] Locking issue on NFS filesystem

On 14 Jun 2010, at 3:16am, Prakash Reddy Bande wrote:

> I have stumbled upon the issue as described in http://sqlite.org/faq.html#q5 
> (But use caution: this locking mechanism might not work correctly if the 
> database file is kept on an NFS filesystem.)
>
> The question is, do we have a workaround. Our application has to store data 
> in user home directory (RHEL/SLES/CentOS) and the home directory might be on 
> a NFS device (as is my home directory).
> stat -f -c %X /users/prakash returns nfs.

Which version of NFS ?  Locking was introduced in version 4.  However, locking 
even under NFS sucks.  That warning in the SQLite FAQ isn't there because the 
writers of SQLite are bad programmers, it's there because locking under many 
NFS installations is not implemented properly.

You may have an alternative of accessing your NFS drive as a shared drive.  If 
you do this, then locking is implemented by the networking protocol, not by the 
driver of the space being shared.  So if you have a way of sharing your NFS 
drive via SMB or AFS, or some other common space-sharing system, you might be 
able to get around the NFS problems completely.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to