SQLite Forum

Switching pragma synchronous to upgrade durability
Login
For example, would it need to be

```sql
BEGIN IMMEDIATE TRANSACTION;
```

instead?

We also have some places that do sqlite3_wal_checkpoint_v2 with SQLITE_CHECKPOINT_TRUNCATE - does that already achieve this effect, regardless of the pragma synchronous mode? The docs talk about syncing the database file - I'd guess that any checkpoint mode of SQLITE_CHECKPOINT_FULL or higher also means doing a sync on the WAL file, though it would be great to confirm.

Thanks,

David