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-15 10:23:42 +0100
committerErik Johnston <erik@matrix.org>2015-04-15 10:23:42 +0100
commitc756dfeb143d61410303dbd51e17303d0b08e7d4 (patch)
tree8c529f28b31d0f8a5759f6b5f263a95bd476cd3a /synapse/storage/engines/postgres.py
parentChange port script to work with postgres (diff)
downloadsynapse-c756dfeb143d61410303dbd51e17303d0b08e7d4.tar.xz
Correctly identify deadlocks
Diffstat (limited to 'synapse/storage/engines/postgres.py')
-rw-r--r--synapse/storage/engines/postgres.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/storage/engines/postgres.py b/synapse/storage/engines/postgres.py
index 9910de5dc2..457c1f70a5 100644
--- a/synapse/storage/engines/postgres.py
+++ b/synapse/storage/engines/postgres.py
@@ -37,7 +37,7 @@ class PostgresEngine(object):
 
     def is_deadlock(self, error):
         if isinstance(error, self.module.DatabaseError):
-            return error.pgcode == "40P01"
+            return error.pgcode in ["40001", "40P01"]
         return False
 
     def load_unicode(self, v):