From b0da265d8392ab26f225c5d88521a53c7bca059e Mon Sep 17 00:00:00 2001 From: Uday Bansal <43824981+udaybansal19@users.noreply.github.com> Date: Tue, 25 Feb 2020 11:53:39 +0530 Subject: [PATCH 1/3] Updated warning for incorrect database collation/ctype Signed-off-by: Uday Bansal <43824981+udaybansal19@users.noreply.github.com> --- synapse/storage/engines/postgres.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/synapse/storage/engines/postgres.py b/synapse/storage/engines/postgres.py index a077345960a9..53b3f372b06d 100644 --- a/synapse/storage/engines/postgres.py +++ b/synapse/storage/engines/postgres.py @@ -53,7 +53,7 @@ def check_database(self, db_conn, allow_outdated_version: bool = False): 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 @@ def check_database(self, db_conn, allow_outdated_version: bool = False): 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): From 5c10655d8200bb72c27d0b2c1bd43339263df18b Mon Sep 17 00:00:00 2001 From: Uday Bansal <43824981+udaybansal19@users.noreply.github.com> Date: Tue, 25 Feb 2020 12:05:33 +0530 Subject: [PATCH 2/3] Updated 6985.misc Signed-off-by: Uday Bansal <43824981+udaybansal19@users.noreply.github.com> --- changelog.d/6985.misc | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/6985.misc diff --git a/changelog.d/6985.misc b/changelog.d/6985.misc new file mode 100644 index 000000000000..53ab243cb6f7 --- /dev/null +++ b/changelog.d/6985.misc @@ -0,0 +1 @@ +Updated warning for incorrect database collation/ctype. \ No newline at end of file From bcedf02bc20a056fcc9c33618c2c01e284a712bf Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Wed, 26 Feb 2020 13:30:26 +0000 Subject: [PATCH 3/3] Update changelog.d/6985.misc --- changelog.d/6985.misc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.d/6985.misc b/changelog.d/6985.misc index 53ab243cb6f7..ba367fa9af13 100644 --- a/changelog.d/6985.misc +++ b/changelog.d/6985.misc @@ -1 +1 @@ -Updated warning for incorrect database collation/ctype. \ No newline at end of file +Update warning for incorrect database collation/ctype to include link to documentation.