SQLite Forum

In-memory database from sqlite file
Login
When copying a file, most file systems will read the source file in order of ascending offsets (i.e. page number order). When committing a transaction, SQLite may write to several pages scattered throughout the file.

Let's say the fs has copied pages 1 to 10, and SQLite commits a transaction covering pages 1, 5, 10 and 15; when the fs is finished, you will have an inconsistent state, with pages 1, 5 and 10 from before and page 15 after a transaction. This is very likely to be a problem, especially if page 15 is an index page that now refers to an old state of a table page. Or maybe page 10 was split into pages 10 and 15...