From c756dfeb143d61410303dbd51e17303d0b08e7d4 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Wed, 15 Apr 2015 10:23:42 +0100 Subject: [PATCH] Correctly identify deadlocks --- synapse/storage/engines/postgres.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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):