use the nonconcurrent pool for running PRAGMA optimize

This commit is contained in:
Gani Georgiev
2025-07-19 10:02:44 +03:00
parent f015911594
commit 641aa54cfc
3 changed files with 3 additions and 3 deletions

View File

@@ -144,7 +144,7 @@ func (app *BaseApp) SyncRecordTableSchema(newCollection *Collection, oldCollecti
// run optimize per the SQLite recommendations
// (https://www.sqlite.org/pragma.html#pragma_optimize)
_, optimizeErr := app.ConcurrentDB().NewQuery("PRAGMA optimize").Execute()
_, optimizeErr := app.NonconcurrentDB().NewQuery("PRAGMA optimize").Execute()
if optimizeErr != nil {
app.Logger().Warn("Failed to run PRAGMA optimize after record table sync", slog.String("error", optimizeErr.Error()))
}