Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Improved docs on setting up Postgresql #5661

Merged
merged 5 commits into from
Jul 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/5661.docs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Improvements to Postgres setup instructions. Contributed by @Lrizika - thanks!
19 changes: 15 additions & 4 deletions docs/postgres.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,14 @@ Assuming your PostgreSQL database user is called ``postgres``, create a user
su - postgres
createuser --pwprompt synapse_user

The PostgreSQL database used *must* have the correct encoding set, otherwise it
would not be able to store UTF8 strings. To create a database with the correct
encoding use, e.g.::
Before you can authenticate with the ``synapse_user``, you must create a
database that it can access. To create a database, first connect to the database
with your database user::

su - postgres
psql

and then run::

CREATE DATABASE synapse
ENCODING 'UTF8'
Expand All @@ -46,7 +51,13 @@ encoding use, e.g.::
OWNER synapse_user;

This would create an appropriate database named ``synapse`` owned by the
``synapse_user`` user (which must already exist).
``synapse_user`` user (which must already have been created as above).

Note that the PostgreSQL database *must* have the correct encoding set (as
shown above), otherwise it will not be able to store UTF8 strings.

You may need to enable password authentication so ``synapse_user`` can connect
to the database. See https://www.postgresql.org/docs/11/auth-pg-hba-conf.html.

Tuning Postgres
===============
Expand Down