summaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2023-01-17 13:29:44 +0100
committerLibravatar GitHub <noreply@github.com>2023-01-17 12:29:44 +0000
commit627b8eeae6b7e3ad11d2b5b0b3f9f46c4aca055f (patch)
tree2eddb361599bac9345147d1cbec7253e8229669b /example
parent[chore]: Bump codeberg.org/gruf/go-errors/v2 from 2.0.2 to 2.1.1 (#1346) (diff)
downloadgotosocial-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 'example')
-rw-r--r--example/config.yaml32
1 files changed, 32 insertions, 0 deletions
diff --git a/example/config.yaml b/example/config.yaml
index 71d26e50c..5ce622a88 100644
--- a/example/config.yaml
+++ b/example/config.yaml
@@ -164,6 +164,38 @@ db-tls-mode: "disable"
# Default: ""
db-tls-ca-cert: ""
+# String. SQLite journaling mode.
+# SQLite only -- unused otherwise.
+# If set to empty string, the sqlite default will be used.
+# See: https://www.sqlite.org/pragma.html#pragma_journal_mode
+# Examples: ["DELETE", "TRUNCATE", "PERSIST", "MEMORY", "WAL", "OFF"]
+# Default: "WAL"
+db-sqlite-journal-mode: "WAL"
+
+# String. SQLite synchronous mode.
+# SQLite only -- unused otherwise.
+# If set to empty string, the sqlite default will be used.
+# See: https://www.sqlite.org/pragma.html#pragma_synchronous
+# Examples: ["OFF", "NORMAL", "FULL", "EXTRA"]
+# Default: "NORMAL"
+db-sqlite-synchronous: "NORMAL"
+
+# Byte size. SQlite cache size.
+# SQLite only -- unused otherwise.
+# If set to empty string or zero, the sqlite default will be used.
+# See: https://www.sqlite.org/pragma.html#pragma_cache_size
+# Examples: ["32MiB", "0", "64MiB"]
+# Default: "64MiB"
+db-sqlite-cache-size: "64MiB"
+
+# Duration. SQlite busy timeout.
+# SQLite only -- unused otherwise.
+# If set to empty string or zero, the sqlite default will be used.
+# See: https://www.sqlite.org/pragma.html#pragma_busy_timeout
+# Examples: ["0s", "1s", "30s", "1m", "5m"]
+# Default: "5s"
+db-sqlite-busy-timeout: "30s"
+
cache:
gts:
###########################