summary refs log tree commit diff
path: root/synapse/storage/search.py
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2020-02-10 17:52:09 +0000
committerAndrew Morgan <andrew@amorgan.xyz>2020-02-10 17:52:09 +0000
commit1114a42739e16b26ff7809e9c7ce54ea6b1ebf40 (patch)
tree0dacd36054bb5a1b60b5a2f39c2b5dbadedb43f0 /synapse/storage/search.py
parentMerge pull request #5385 from matrix-org/erikj/reduce_http_exceptions (diff)
parentRemove Postgres 9.4 support (#5448) (diff)
downloadsynapse-1114a42739e16b26ff7809e9c7ce54ea6b1ebf40.tar.xz
Remove Postgres 9.4 support (#5448)
Diffstat (limited to 'synapse/storage/search.py')
-rw-r--r--synapse/storage/search.py22
1 files changed, 0 insertions, 22 deletions
diff --git a/synapse/storage/search.py b/synapse/storage/search.py

index ff49eaae02..10a27c207a 100644 --- a/synapse/storage/search.py +++ b/synapse/storage/search.py
@@ -341,29 +341,7 @@ class SearchStore(BackgroundUpdateStore): for entry in entries ) - # inserts to a GIN index are normally batched up into a pending - # list, and then all committed together once the list gets to a - # certain size. The trouble with that is that postgres (pre-9.5) - # uses work_mem to determine the length of the list, and work_mem - # is typically very large. - # - # We therefore reduce work_mem while we do the insert. - # - # (postgres 9.5 uses the separate gin_pending_list_limit setting, - # so doesn't suffer the same problem, but changing work_mem will - # be harmless) - # - # Note that we don't need to worry about restoring it on - # exception, because exceptions will cause the transaction to be - # rolled back, including the effects of the SET command. - # - # Also: we use SET rather than SET LOCAL because there's lots of - # other stuff going on in this transaction, which want to have the - # normal work_mem setting. - - txn.execute("SET work_mem='256kB'") txn.executemany(sql, args) - txn.execute("RESET work_mem") elif isinstance(self.database_engine, Sqlite3Engine): sql = (