On 04/05/2011 04:49 PM, Filip Navara wrote: > Hello, > > we are having problem with database that originated on computer of one > of our customers. > > The database is used in WAL mode with auto_vacuum=1 and page_size=1024. > > When running the "pragma incremental_vacuum(1);" command the WAL file > grows to 14Mb, while we would expect it to grow only to about 4Kb (1Kb > per page + some overhead). This causes the transaction to run for much > longer time than expected and eventually the WAL file grows to several > gigabytes when we try to run incremental_vacuum for 4096 pages. > > Additional facts: > - The database was created with SQLite 3.7.5 running on Windows > - "pragma integrity_check;" reports ok > - Some free trunk list pages contain weird values in the "number of > entries" field > > I have attached most of the dumps that I could create with the regular > SQLite tools (showdb dbheader, sqlite3_analyzer output, beginning of > the free list dump). I'm willing to send the whole database file > (~5Gb) to sqlite developers on request. > > My questions are: > - Is is expected behavior that "pragma incremental_vacuum(1);" can > create 14Mb WAL file even though the page size is just 1Kb? > - If not, is it a know bug? If yes, in what circumstances? > - Is the free list corrupted? And if it is, how could this happen and > should "pragma integrity_check;" verify it?
Was there a *-wal file in the file-system when you ran the [showdb] tool? [showdb] just reads the database file, it is not smart enough to know when it should read pages out of the wal file instead of the db. So if there is a wal file that contains content, [showdb] could report corruption. Also, can you try with this patch? http://www.sqlite.org/src/ci/311d0b613d It might help with the 14MB wal files. Dan. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users