summaryrefslogtreecommitdiff
path: root/docs/configuration/database.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/configuration/database.md')
-rw-r--r--docs/configuration/database.md14
1 files changed, 14 insertions, 0 deletions
diff --git a/docs/configuration/database.md b/docs/configuration/database.md
index 3a7143593..f5be85164 100644
--- a/docs/configuration/database.md
+++ b/docs/configuration/database.md
@@ -44,6 +44,12 @@ grant all privileges on database gotosocial to gotosocial;
GoToSocial makes use of ULIDs (Universally Unique Lexicographically Sortable Identifiers) which will not work in non-English collate environments. For this reason it is important to create the database with `C.UTF-8` locale. To do that on systems which were already initialized with non-C locale, `template0` pristine database template must be used.
+If you want to use specific options when connecting to Postgres, you can use `db-postgres-connection-string` to define the connection string. If `db-postgres-connection-string` is defined, all other database related configuration fields will be ignored. For example, we can use `db-postgres-connection-string` to connect to `mySchema`, where the user name is `myUser` and password is `myPass` at `localhost` with the database name of `db`:
+
+```yaml
+db-postgres-connection-string: 'postgres://myUser:myPass@localhost/db?search_path=mySchema'
+```
+
## Settings
!!! danger "SQLite cache sizes"
@@ -177,6 +183,14 @@ db-sqlite-cache-size: "8MiB"
# Default: "30m"
db-sqlite-busy-timeout: "30m"
+# String. Full Database connection string
+#
+# This connection string is only applicable for Postgres. When this field is defined, all other database related configuration field will be ignored. This field allow you to fine tune connection with Postgres
+#
+# Examples: ["postgres://user:pass@localhost/db?search_path=gotosocial", "postgres://user:pass@localhost:9999/db"]
+# Default: ""
+db-postgres-connection-string: ""
+
cache:
# cache.memory-target sets a target limit that
# the application will try to keep it's caches