Thanks for your explanations Dan.  The new WAL feature sounds great and I'm
excited to try it.  Two questions below:

> When in WAL mode, clients use file-locks to implement a kind of
> robust (crash-proof) reference counting for each database file.
> When a client disconnects, if it is the only client connected to
> that database file, it automatically runs a checkpoint and
> then deletes the *-wal file.
> 
...
> On the other hand, if the only client connected to a database
> does not disconnect cleanly (i.e. it crashes, the system crashes,
> or the client exits without calling sqlite3_close()), then it
> leaves the *-wal file in place. In this case, when the next
> client connects to the database file it has to read the entire
> *-wal file to reconstruct the wal-index. If the *-wal file is
> large, this might take a while.

With WAL mode if there is a crash, it seems like the reference counting
would be messed up from that point on (meaning too high).  In that case, the
*-wal file will always exist, right?  It wouldn't affect the database
robustness but I guess it would be a case where the startup performance
being discussed would be affected.

Also, is the reference counting per process or per connection?

Thanks
Doug



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

Reply via email to