mirror of
https://github.com/element-hq/synapse.git
synced 2024-12-14 11:57:44 +00:00
Disable statement timeout during room purge
This commit is contained in:
parent
790ce14e46
commit
775b2de9f0
2 changed files with 6 additions and 0 deletions
1
changelog.d/18017.misc
Normal file
1
changelog.d/18017.misc
Normal file
|
@ -0,0 +1 @@
|
|||
Disable DB statement timeout when doing a purge room since it can be quite long.
|
|
@ -376,6 +376,11 @@ class PurgeEventsStore(StateGroupWorkerStore, CacheInvalidationWorkerStore):
|
|||
(room_id,),
|
||||
)
|
||||
|
||||
if isinstance(self.database_engine, PostgresEngine):
|
||||
# Disable statement timeouts for this transaction; purging rooms can
|
||||
# take a while!
|
||||
txn.execute("SET LOCAL statement_timeout = 0")
|
||||
|
||||
# First, fetch all the state groups that should be deleted, before
|
||||
# we delete that information.
|
||||
txn.execute(
|
||||
|
|
Loading…
Reference in a new issue