Thomas, Basil wrote:
> I am no technical expert but...could not page locking at least be implemented
> by the pager module to increase concurrency(very naive...but better than file
> locking).
>
Page-level locking will not help. For one thing, we cannot do both page-level locking and reader/writer locks on win95/98/ME. Presumably, reader/writer locks are more desirable than page locks and we are not yet ready to abandon win95/98/ME. (You can do both on unix and winNT/2K/XP.)
But more importantly, locking is less than half the problem. The hard part is not locking but recovering from a program crash or OS crash or power failure. If we didn't have to deal with crashes and power failures, doing page-level or row-level locking would be (relatively) easy.
In version 3.0, you will be able to ATTACH multiple databases and update them all at once (and atomicially). Then if you put each of your tables in a separate database file and ATTACH them as needed, the end result will be something very like table-level locking. Without a central server process to coordinate things, getting any more concurrency than that is not a viable option, as far as I can determine.
Given that (IMHO) most concurrency problems seem to be centred around a single application with multiple threads, might it not be possible for that application to 'register' with SQLite in order to implement table locks.
So, my app says to SQLite 'register lock manager' Then SQLite says to my lock manager function:
- lock database xyz.db for writing - lock table aa for writing - lock table bb for writing - unlock table bb - unlock table aa - unlock database xyz.db
The application should put a file lock on the database when it gets the 'lock database' callback, so that other applications sharing the file can't write to it, but if another thread in the same application also does a 'lock database xyz.db', then it would just increment a reference count, not try to lock it again.
Similarly for the tables. The application could do all the hard work in this case.
If there was no callback registered, SQLite would act like it does now, with file level locks
Paul VPOP3 - Internet Email Server/Gateway [EMAIL PROTECTED] http://www.pscs.co.uk/
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]