1

我有 SQLite 数据库WAL模式。每次我VACUUM对数据库执行 a 时,日志模式都会在DELETE我下次重新连接时恢复。

例如:

PRAMGA journal_mode; -- returns wal
VACUUM;
PRAGMA journal_mode; -- returns wal
-- disconnect then reconnect
PRAGMA journal_mode; -- returns delete

在 SQLite 3.7 中观察到的行为,但似乎在 3.8 中已修复。

4

1 回答 1

0

The -wal file will be automatically deleted in certain situations where it's known to be empty, such as closing the DB when there are no other users. It will be automatically recreated when needed, on the next transaction.

The journal mode (as reported by PRAGMA journal_mode) should never change during this.

于 2012-11-18T21:36:34.110 回答