summary refs log tree commit diff
path: root/synapse/storage/engines/postgres.py
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2016-03-03 19:05:54 +0000
committerRichard van der Hoff <richard@matrix.org>2016-03-03 19:05:54 +0000
commita85179aff3bf2bc1b132e9918cd8222a61a8bcc2 (patch)
treeaac1ff9e5bdca7ddc0fdc9d2cae5a5dcf13e8733 /synapse/storage/engines/postgres.py
parentEmpty commit (diff)
parentMerge pull request #621 from matrix-org/daniel/ratelimiting (diff)
downloadsynapse-a85179aff3bf2bc1b132e9918cd8222a61a8bcc2.tar.xz
Merge remote-tracking branch 'origin/develop' into rav/SYN-642
Diffstat (limited to 'synapse/storage/engines/postgres.py')
-rw-r--r--synapse/storage/engines/postgres.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/storage/engines/postgres.py b/synapse/storage/engines/postgres.py
index 17b7a9c077..a09685b4df 100644
--- a/synapse/storage/engines/postgres.py
+++ b/synapse/storage/engines/postgres.py
@@ -21,9 +21,10 @@ from ._base import IncorrectDatabaseSetup
 class PostgresEngine(object):
     single_threaded = False
 
-    def __init__(self, database_module):
+    def __init__(self, database_module, config):
         self.module = database_module
         self.module.extensions.register_type(self.module.extensions.UNICODE)
+        self.config = config
 
     def check_database(self, txn):
         txn.execute("SHOW SERVER_ENCODING")
@@ -44,7 +45,7 @@ class PostgresEngine(object):
         )
 
     def prepare_database(self, db_conn):
-        prepare_database(db_conn, self)
+        prepare_database(db_conn, self, config=self.config)
 
     def is_deadlock(self, error):
         if isinstance(error, self.module.DatabaseError):