[sqlite] Manual flush before commit

2010-02-13 Thread Michael Tharp
Hullo, I have a package manager that consists of a sqlite database combined with a filesystem journal that is created during system updates. The journal contains enough information to clean up the filesystem if an update is interrupted by e.g. a power failure. Naturally, these two journals

Re: [sqlite] Manual flush before commit

2010-02-13 Thread Michael Tharp
On 02/14/2010 01:09 AM, Simon Slavin wrote: > read the distinctions between the different types of 'BEGIN'. I don't see any mention of flushing behaviour, just earlier locks. I guess what I'm asking for is a lightweight two-phase commit, which seems easy enough to do given the current

[sqlite] Exposing sqlite3BtreeCommitPhaseOne

2010-04-06 Thread Michael Tharp
commit or roll back the filesystem journal. If I could flush the dirty pages first, then the actual commit is short enough to be effectively instantaneous and there's little chance of an interrupt arriving at the same time. Would it be possible to expose this first phase via a C or SQL API? Thanks! --