SQLite Forum

SQLITE_IOERR on `pragma optimize`
Login
Sorry for the confusion; the library/language bindings for sqlite that I'm using crashes on `SQLITE_IOERR`.  

`PRAGMA optimize` is returning `SQLITE_IOERR` afaict.

My suspicion that the journal_mode is a factor seems have borne out; I don't see get the error with `PRAGMA journal_mode = delete`, but I had wanted `journal_mode = wal` for performance reasons; more important than `PRAGMA optimize`, I suppose.

But I'm surprised that `PRAGMA optimize` would return `SQLITE_IOERR` at all; is that expected?  I'm on macOS and using a local file system.