From 6d482ba259a55947678390c06b24a7ba91f0ebab Mon Sep 17 00:00:00 2001
From: Brendan Abolivier <babolivier@matrix.org>
Date: Thu, 27 Jan 2022 17:45:39 +0000
Subject: [PATCH] Pass `isolation_level` to `runWithConnection` (#11847)

This was missed in https://github.com/matrix-org/synapse/pull/11799
---
 changelog.d/11847.misc      | 1 +
 synapse/storage/database.py | 1 +
 2 files changed, 2 insertions(+)
 create mode 100644 changelog.d/11847.misc

diff --git a/changelog.d/11847.misc b/changelog.d/11847.misc
new file mode 100644
index 0000000000..5c3b2bcaf4
--- /dev/null
+++ b/changelog.d/11847.misc
@@ -0,0 +1 @@
+Preparation for reducing Postgres serialization errors: allow setting transaction isolation level. Contributed by Nick @ Beeper.
diff --git a/synapse/storage/database.py b/synapse/storage/database.py
index 7455326ed3..99802228c9 100644
--- a/synapse/storage/database.py
+++ b/synapse/storage/database.py
@@ -748,6 +748,7 @@ class DatabasePool:
                     func,
                     *args,
                     db_autocommit=db_autocommit,
+                    isolation_level=isolation_level,
                     **kwargs,
                 )
 
-- 
GitLab