mirror of https://github.com/zulip/zulip.git
pgroonga: Remove long-running update query in initial migration.
This query doesn't add any value, because it'll be overwritten in migration 0002 anyway. And because it isn't batched, it can take several minutes to run on servers with hundreds of thousands to millions of messages of history. During that time, it's in a transaction, and thus one can't send messages, so it forces downtime.
This commit is contained in:
parent
e95f972e24
commit
aaad7fe2f7
|
@ -20,8 +20,6 @@ SET search_path = %(SCHEMA)s,public,pgroonga,pg_catalog;
|
|||
|
||||
ALTER TABLE zerver_message ADD COLUMN search_pgroonga text;
|
||||
|
||||
UPDATE zerver_message SET search_pgroonga = subject || ' ' || rendered_content;
|
||||
|
||||
-- TODO: We want to use CREATE INDEX CONCURRENTLY but it can't be used in
|
||||
-- transaction. Django uses transaction implicitly.
|
||||
-- Django 1.10 may solve the problem.
|
||||
|
|
Loading…
Reference in New Issue