Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maunium
synapse
Commits
e365ad32
Commit
e365ad32
authored
7 years ago
by
Matthew Hodgson
Browse files
Options
Downloads
Patches
Plain Diff
oops, tweak work_mem when actually storing
parent
19f92276
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
synapse/storage/room.py
+2
-0
2 additions, 0 deletions
synapse/storage/room.py
with
2 additions
and
0 deletions
synapse/storage/room.py
+
2
−
0
View file @
e365ad32
...
@@ -310,6 +310,7 @@ class RoomStore(SQLBaseStore):
...
@@ -310,6 +310,7 @@ class RoomStore(SQLBaseStore):
def
_store_event_search_txn
(
self
,
txn
,
event
,
key
,
value
):
def
_store_event_search_txn
(
self
,
txn
,
event
,
key
,
value
):
if
isinstance
(
self
.
database_engine
,
PostgresEngine
):
if
isinstance
(
self
.
database_engine
,
PostgresEngine
):
txn
.
execute
(
"
SET work_mem=
'
256KB
'"
)
sql
=
(
sql
=
(
"
INSERT INTO event_search
"
"
INSERT INTO event_search
"
"
(event_id, room_id, key, vector, stream_ordering, origin_server_ts)
"
"
(event_id, room_id, key, vector, stream_ordering, origin_server_ts)
"
...
@@ -323,6 +324,7 @@ class RoomStore(SQLBaseStore):
...
@@ -323,6 +324,7 @@ class RoomStore(SQLBaseStore):
event
.
origin_server_ts
,
event
.
origin_server_ts
,
)
)
)
)
txn
.
execute
(
"
RESET work_mem
"
)
elif
isinstance
(
self
.
database_engine
,
Sqlite3Engine
):
elif
isinstance
(
self
.
database_engine
,
Sqlite3Engine
):
sql
=
(
sql
=
(
"
INSERT INTO event_search (event_id, room_id, key, value)
"
"
INSERT INTO event_search (event_id, room_id, key, value)
"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment