summary refs log tree commit diff
path: root/synapse/storage/engines/postgres.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-04-27 12:40:49 +0100
committerErik Johnston <erik@matrix.org>2015-04-27 12:40:49 +0100
commite4c4664d73abd260264f51a0645281d21afc358e (patch)
tree684e22581ba19acd588a75cc9ab42ff4adef3172 /synapse/storage/engines/postgres.py
parentRevert needless change to rest.profile (diff)
downloadsynapse-e4c4664d73abd260264f51a0645281d21afc358e.tar.xz
Handle the fact that postgres databases can be restarted from under us
Diffstat (limited to 'synapse/storage/engines/postgres.py')
-rw-r--r--synapse/storage/engines/postgres.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/storage/engines/postgres.py b/synapse/storage/engines/postgres.py
index 6f75245fa7..00dbae7b60 100644
--- a/synapse/storage/engines/postgres.py
+++ b/synapse/storage/engines/postgres.py
@@ -39,3 +39,6 @@ class PostgresEngine(object):
         if isinstance(error, self.module.DatabaseError):
             return error.pgcode in ["40001", "40P01"]
         return False
+
+    def is_connection_closed(self, conn):
+        return bool(conn)