On Sat, Mar 17, 2012 at 10:42 AM, Richard Hipp <[email protected]> wrote:

>  On Sat, Mar 17, 2012 at 1:08 AM, Arnav Aggarwal <
> [email protected]> wrote:
>
> > On Sat, Mar 17, 2012 at 10:10 AM, Roger Binns <[email protected]>
> > wrote:
> >
> > > -----BEGIN PGP SIGNED MESSAGE-----
> > > Hash: SHA1
> > >
> > > On 16/03/12 20:34, Arnav Aggarwal wrote:
> > > > I want to link sqlite code with my application which is single
> > > > threaded. So, I keep SQLITE_THREADSAFE=0.
> > >
> > > I would recommend leaving it at the default.  Any performance penalty
> is
> > > unlikely to even be measurable.  Additionally as your app grows, other
> > > programmers work on it, time passes, new libraries are added etc there
> is
> > > always the possibility of someone adding helper threads or some other
> > form
> > > of concurrency.  The default will at least ensure you won't silently
> > trash
> > > memory.
> > >
> > > > Is it safe to pass "unix-nolock" as the application is single
> threaded
> > > > ?
> > >
> > > Use null/default.  Again there is no need to try to optimise.
> > >
> > > > I mean is there any need to create a "lock" file if only single
> thread
> > > > is using the database ?
> > >
> > > Until one day another developer or a system administrator runs the
> SQLite
> > > shell and trashes the database inadvertently (which you may not
> discover
> > > for a while).
> > >
> > > There really isn't any point trying to micro-optimise this stuff.  It
> > > won't make a performance or memory difference, and it requires
> perfection
> > > from developers, system administrators and future versions of yourself.
> > >
> > Thanks Roger. I agree with what you said.
> > I am using "unix-dotfile" because that is the safest thing that works
> with
> > my filesystem.
> >
>
> If the default doesn't work on your filesystem (and unix-dotfile is not the
> default) then that is a pretty good indicator that you need to get a new
> filesystem.
>

Richard, my filesystem is a propreitary one that doesn't support unix
locking. But, it does support basic file creation/deletion operations.

Again, back to original question of how to clean stale lock and journal
files.
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to