Hi Dan, > > I've finally implemented the backup API and it works like a charm > > except on an important point. > > The example given on the site clearly says: > > > > "If another thread writes to database connection pDb while this > > function is sleeping, then the backup database (database connection > > pFile) is automatically updated along with pDb. The backup process is > > continued after the xSleep() call returns as if nothing had happened. > > If the database file underlying connection pDb is written to by a > > different process or thread using a different database connection > > while > > this function is sleeping, then SQLite detects this within the next > > call made to sqlite3_backup_step() and restarts the backup from the > > beginning." > >Is it an in-memory database you're backing up (i.e. is pDb in-memory)? > >I have a feeling that statement won't apply if the source db is >an in-memory database.
That's correct: only disk-based databases enjoy the feature. Thanks for the hint. This really should be clarified in both the documentation and the example page. OTOH, is there a possibility that someday the backup sub-engine rewrites only dirty pages and not the whole file from scratch? This would requires that SQLite makes a note of which pages have become dirty between two backup-steps and certainly other housekeeping as well. Is this something that could be made in some future version? I feel it would make backups _much_ easier to cope with in the case of live databases where spurious writes are difficult to avoid. _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

