diff options
author | Uday Bansal <43824981+udaybansal19@users.noreply.github.com> | 2020-02-26 20:47:03 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-26 15:17:03 +0000 |
commit | 7728d87fd7e1af17dd6b0c619cbfecb1fadb624f (patch) | |
tree | 0f05f7fad2a5fc0b5f43734f44131af351f05937 | |
parent | Ensure 'deactivated' parameter is a boolean on user admin API, Fix error hand... (diff) | |
download | synapse-7728d87fd7e1af17dd6b0c619cbfecb1fadb624f.tar.xz |
Updated warning for incorrect database collation/ctype (#6985)
Signed-off-by: Uday Bansal <43824981+udaybansal19@users.noreply.github.com>
-rw-r--r-- | changelog.d/6985.misc | 1 | ||||
-rw-r--r-- | synapse/storage/engines/postgres.py | 10 |
2 files changed, 8 insertions, 3 deletions
diff --git a/changelog.d/6985.misc b/changelog.d/6985.misc new file mode 100644 index 0000000000..ba367fa9af --- /dev/null +++ b/changelog.d/6985.misc @@ -0,0 +1 @@ +Update warning for incorrect database collation/ctype to include link to documentation. diff --git a/synapse/storage/engines/postgres.py b/synapse/storage/engines/postgres.py index a077345960..53b3f372b0 100644 --- a/synapse/storage/engines/postgres.py +++ b/synapse/storage/engines/postgres.py @@ -53,7 +53,7 @@ class PostgresEngine(object): if rows and rows[0][0] != "UTF8": raise IncorrectDatabaseSetup( "Database has incorrect encoding: '%s' instead of 'UTF8'\n" - "See docs/postgres.rst for more information." % (rows[0][0],) + "See docs/postgres.md for more information." % (rows[0][0],) ) txn.execute( @@ -62,12 +62,16 @@ class PostgresEngine(object): collation, ctype = txn.fetchone() if collation != "C": logger.warning( - "Database has incorrect collation of %r. Should be 'C'", collation + "Database has incorrect collation of %r. Should be 'C'\n" + "See docs/postgres.md for more information.", + collation, ) if ctype != "C": logger.warning( - "Database has incorrect ctype of %r. Should be 'C'", ctype + "Database has incorrect ctype of %r. Should be 'C'\n" + "See docs/postgres.md for more information.", + ctype, ) def check_new_database(self, txn): |