diff options
author | 2023-01-17 13:29:44 +0100 | |
---|---|---|
committer | 2023-01-17 12:29:44 +0000 | |
commit | 627b8eeae6b7e3ad11d2b5b0b3f9f46c4aca055f (patch) | |
tree | 2eddb361599bac9345147d1cbec7253e8229669b /internal/config/defaults.go | |
parent | [chore]: Bump codeberg.org/gruf/go-errors/v2 from 2.0.2 to 2.1.1 (#1346) (diff) | |
download | gotosocial-627b8eeae6b7e3ad11d2b5b0b3f9f46c4aca055f.tar.xz |
[feature] Tune sqlite pragmas (#1349)
* sqlite pragma tuning
* use formatuint
* add sqlite busy timeout
* fix incorrect cache size format
* update envparsing test
* add sqlite tuning flags to cli
* set sqlite timeout to 30s default
Diffstat (limited to 'internal/config/defaults.go')
-rw-r--r-- | internal/config/defaults.go | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/internal/config/defaults.go b/internal/config/defaults.go index 4d61bec05..31f282113 100644 --- a/internal/config/defaults.go +++ b/internal/config/defaults.go @@ -40,14 +40,18 @@ var Defaults = Configuration{ Port: 8080, TrustedProxies: []string{"127.0.0.1/32", "::1"}, // localhost - DbType: "postgres", - DbAddress: "", - DbPort: 5432, - DbUser: "", - DbPassword: "", - DbDatabase: "gotosocial", - DbTLSMode: "disable", - DbTLSCACert: "", + DbType: "postgres", + DbAddress: "", + DbPort: 5432, + DbUser: "", + DbPassword: "", + DbDatabase: "gotosocial", + DbTLSMode: "disable", + DbTLSCACert: "", + DbSqliteJournalMode: "WAL", + DbSqliteSynchronous: "NORMAL", + DbSqliteCacheSize: 64 * bytesize.MiB, + DbSqliteBusyTimeout: time.Second * 30, WebTemplateBaseDir: "./web/template/", WebAssetBaseDir: "./web/assets/", |