diff options
| author | 2025-04-11 18:41:50 +0800 | |
|---|---|---|
| committer | 2025-04-11 12:41:50 +0200 | |
| commit | 1e59795ff4ccc754a76025921ea60107964f5a8c (patch) | |
| tree | 2fea84b3ad746a4df0867aafac20eb7d362f37ae /docs/configuration | |
| parent | [chore] render avatar in photoswipe slide, remove repeated alt text (#3985) (diff) | |
| download | gotosocial-1e59795ff4ccc754a76025921ea60107964f5a8c.tar.xz | |
[docs] add instruction about postgres permission (#3981)
Diffstat (limited to 'docs/configuration')
| -rw-r--r-- | docs/configuration/database.md | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/configuration/database.md b/docs/configuration/database.md index f5be85164..4179f846d 100644 --- a/docs/configuration/database.md +++ b/docs/configuration/database.md @@ -42,6 +42,13 @@ create user gotosocial with password 'some_really_good_password'; grant all privileges on database gotosocial to gotosocial; ``` +If you start using Postgres after 14, or you encounter `error executing command: error creating dbservice: db migration error: ERROR: permission denied for schema public`, you should grant `CREATE` permission to your db user: + +```psql +GRANT CREATE ON SCHEMA public TO gotosocial; +SELECT has_schema_privilege('gotosocial', 'public', 'CREATE'); -- should return t +``` + 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`: |
