diff options
author | Andrew Morgan <andrew@amorgan.xyz> | 2020-04-02 11:29:00 +0100 |
---|---|---|
committer | Andrew Morgan <andrew@amorgan.xyz> | 2020-04-02 11:29:00 +0100 |
commit | db2652cc5e26d7f4542df084233c7e146e6594bd (patch) | |
tree | 22b470f484d41e4a3fa1f0d7cad43f351feb126e /synapse | |
parent | Note where bugs were introduced (diff) | |
download | synapse-anoa/halfy_try_this.tar.xz |
Postgres db_wait fix github/anoa/halfy_try_this anoa/halfy_try_this
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/storage/engines/postgres.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/synapse/storage/engines/postgres.py b/synapse/storage/engines/postgres.py index 6c7d08a6f2..2fe9c38652 100644 --- a/synapse/storage/engines/postgres.py +++ b/synapse/storage/engines/postgres.py @@ -14,6 +14,7 @@ # limitations under the License. import logging +import psycopg2.extras from ._base import BaseDatabaseEngine, IncorrectDatabaseSetup @@ -24,6 +25,7 @@ class PostgresEngine(BaseDatabaseEngine): def __init__(self, database_module, database_config): super().__init__(database_module, database_config) self.module.extensions.register_type(self.module.extensions.UNICODE) + self.module.extensions.set_wait_callback(psycopg2.extras.wait_select) # Disables passing `bytes` to txn.execute, c.f. #6186. If you do # actually want to use bytes than wrap it in `bytearray`. |