1 files changed, 2 insertions, 6 deletions
diff --git a/synapse/storage/database.py b/synapse/storage/database.py
index f5fb1a33de..7f94cb00d6 100644
--- a/synapse/storage/database.py
+++ b/synapse/storage/database.py
@@ -19,7 +19,6 @@ from collections import defaultdict
from sys import intern
from time import monotonic as monotonic_time
from typing import (
- TYPE_CHECKING,
Any,
Callable,
Collection,
@@ -53,9 +52,6 @@ from synapse.storage.background_updates import BackgroundUpdater
from synapse.storage.engines import BaseDatabaseEngine, PostgresEngine, Sqlite3Engine
from synapse.storage.types import Connection, Cursor
-if TYPE_CHECKING:
- from psycopg2.extensions import ConnectionInfo
-
# python 3 does not have a maximum int value
MAX_TXN_ID = 2 ** 63 - 1
@@ -435,9 +431,9 @@ class DatabasePool:
# We store the connection info for later use when using postgres
# (primarily to allow things like the state auto compressor to connect
# to the DB).
- self.postgres_connection_info: Optional["ConnectionInfo"] = None
+ self.postgres_connection_info_parameters: Optional[Dict] = None
if isinstance(self.engine, PostgresEngine):
- self.postgres_connection_info = db_conn.info
+ self.postgres_connection_info_parameters = db_conn.info.dsn_parameters
if self.engine.can_native_upsert:
# Check ASAP (and then later, every 1s) to see if we have finished
|