sqlitecore-dataios7swiftdatawal

How to merge contents of SQLite 3.7 WAL file into main database file


With WAL (Write-Ahead-Logging) enabled in SQLite 3.7 (which is the default for Core Data on iOS 7), how do I merge/commit the content from the -wal file back into the main database file?


Solution

  • Do a checkpoint, i.e., execute PRAGMA wal_checkpoint.