> Then I tried in a loop with 2 programs to write / read in parallel and it
> seems to work without problems. Can anyone advise if this has any chance to
> work (or say it would definitely NOT work)?
>
> As a short summary: would it be interesting for anyone to enable read-only
> open with a special pragma to allow reading without locking (that means,
> shared locks being a noop)?
>
>

Although speaking generally such method could be used in some situations, I
don't think it's good to allow to use it even with a "i know what I'm doing"
pragma. Any structured file (sqlite is an example) have internal
dependencies. One of the reasons to block is to write different parts of
structured data together without intervention from other parties in order to
keep the data integral. Imagine writing cache that kept changes for your
writer and finally it needed to flush the data and at the same time your
"anytime" reader started to perform some query in the middle of this
multiply pages writing process. I can't predict whether the reader will end
with some valid result or it will return with "database malformed" error.

Instead consider changing your own logic. You wrote "without* any
possibility to be blocked". I suppose you already have a perfect writer that
fits your needs, but if you post some info about the nature of your writer
and reader (records per second and something like this), it would help to be
more specific with answers.

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

Reply via email to