On Tue, Mar 20, 2012 at 8:25 PM, Jay A. Kreibich <[email protected]> wrote: > On Tue, Mar 20, 2012 at 01:59:59PM -0700, Udi Karni scratched on the wall: >> Is there a way to go directory from "original" to "journal/final" - >> skipping the creation of the Temp version? > > No, it requires all three copies. <...> > Almost exactly two years ago I proposed a "VACUUM TO <filename>" > version of the command that did the first copy and then quit. Rather > than building an optimized temp copy, VACUUM TO would copy the > current database to an optimized named file (rather than a temp file), > and then skip the copy-back stage. This would allow a system admin > to shut down all database users, VACUUM the database, swap files, > and finally restart everything. The process would require more > manual work, but would only require 2x the drive space, rather than > 3x. Nobody spoke up about the idea, however.
I think you could manage 2x-the-drive-space without shutdown by writing a read-only VFS which treated the pages in the journal as its backing store, faulting missed through to the main file. Then you could VACUUM from the database-in-the-journal to the database-in-the-database. In case of failure, the journal rolls things back like you'd expect. I _think_ this would work. -scott _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

