From 641aa54cfc81999d1290f6a3d03242e68232b388 Mon Sep 17 00:00:00 2001 From: Gani Georgiev Date: Sat, 19 Jul 2025 10:02:44 +0300 Subject: [PATCH] use the nonconcurrent pool for running PRAGMA optimize --- CHANGELOG.md | 2 +- core/base.go | 2 +- core/collection_record_table_sync.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f18a483e..ecb8056d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,7 +13,7 @@ - Fixed Dashboard page title `-` escaping ([#6982](https://github.com/pocketbase/pocketbase/issues/6982)). -- Other minor improvements (wrapped the backup restore in a transaction as an extra precaution, updated npm deps, regenerated JSVM docs with the recent tygoja changes, etc.). +- Other minor improvements (updated first superuser console text when running with `go run`, clarified trusted IP proxy header label, wrapped the backup restore in a transaction as an extra precaution, updated npm deps, etc.). ## v0.28.4 diff --git a/core/base.go b/core/base.go index b76c225f..15f16ae9 100644 --- a/core/base.go +++ b/core/base.go @@ -1365,7 +1365,7 @@ func (app *BaseApp) registerBaseHooks() { app.Logger().Warn("Failed to run periodic PRAGMA wal_checkpoint for the auxiliary DB", slog.String("error", execErr.Error())) } - _, execErr = app.ConcurrentDB().NewQuery("PRAGMA optimize").Execute() + _, execErr = app.NonconcurrentDB().NewQuery("PRAGMA optimize").Execute() if execErr != nil { app.Logger().Warn("Failed to run periodic PRAGMA optimize", slog.String("error", execErr.Error())) } diff --git a/core/collection_record_table_sync.go b/core/collection_record_table_sync.go index 3ecf2080..35eda70f 100644 --- a/core/collection_record_table_sync.go +++ b/core/collection_record_table_sync.go @@ -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())) }