zulip/zerver/migrations
Zev Benjamin 298e008cc2 [manual] Turn off GIN fast update for zephyr_message_search_tsvector
Apply this commit after hours!

To apply this commit, first run the migration and then run the following as the
zulip user on staging:

$ echo 'VACUUM zerver_message' | python manage.py dbshell

The above VACUUM is needed to clean out the existing fast update pending list.
It might take a long time and block new message inserts!

See discussion near Zulip message 18377486 for why we're turning off the fast
update mechanism for zephyr_message_search_tsvector.

The high level overview is:
As a consequence of the high work_mem setting on our postgres server, the
fastupdate pending list for zephyr_message_search_tsvector can grow very large.
This leads to the occasional INSERT or UPDATE taking inordinately long (many
minutes) as the pending list is flushed, blocking other inserts.

One other possible solution for preventing the list from growing too large is to
set the autovacuum storage parameters on the table such that the autovacuum
process will run after a reasonable number of INSERTs or UPDATEs.  However, the
table is mostly INSERT-only.  Therefore, only the autovacuum_analyze_*
parameters will actually do anything to affect when the autovacuumer will run,
but when it does, it will do a VACUUM ANALYZE instead of a plain VACUUM.  We
don't particularly need the table to be re-analyzed that often.

Turning off fast update will eventually cause the index to become less
efficient, but we can always rebuild it later if we notice it starting to get
too slow.

(imported from commit f280c193c3bc0a3f312960510c5a7dcf97f30c3d)
2014-05-20 22:38:48 -07:00
..
0001_initial.py [manual] Rename Django app from zephyr to zerver. 2013-08-06 07:39:36 -04:00
0017_auto__add_field_subscription_color.py [manual] Rename Django app from zephyr to zerver. 2013-08-06 07:39:36 -04:00
0018_auto__add_unique_userprofile_email.py [manual] Rename Django app from zephyr to zerver. 2013-08-06 07:39:36 -04:00
0019_auto__add_field_userprofile_tutorial_status.py [manual] Rename Django app from zephyr to zerver. 2013-08-06 07:39:36 -04:00
0020_set_tutorial_finished.py [manual] Rename Django app from zephyr to zerver. 2013-08-06 07:39:36 -04:00
0021_auto__add_field_subscription_notifications.py [manual] Rename Django app from zephyr to zerver. 2013-08-06 07:39:36 -04:00
0022_create_humbug_search_config.py [manual] Change references to the humbug user, schema, and database to zulip 2013-10-26 04:16:27 -04:00
0023_rebuild_search_tsvector.py [manual] Change references to the humbug user, schema, and database to zulip 2013-10-26 04:16:27 -04:00
0024_create_escape_html_function.py [manual] Rename Django app from zephyr to zerver. 2013-08-06 07:39:36 -04:00
0025_auto__add_field_userprofile_enable_sounds.py [manual] Rename Django app from zephyr to zerver. 2013-08-06 07:39:36 -04:00
0026_auto__add_field_userprofile_enable_offline_email_notifications__add_fi.py [manual] Rename Django app from zephyr to zerver. 2013-08-06 07:39:36 -04:00
0027_auto__add_field_userprofile_is_bot__add_field_userprofile_bot_owner.py [manual] Rename Django app from zephyr to zerver. 2013-08-06 07:39:36 -04:00
0028_auto__add_field_userprofile_onboarding_steps.py [manual] Rename Django app from zephyr to zerver. 2013-08-06 07:39:36 -04:00
0029_auto__add_field_message_last_edit_time__add_field_message_edit_history.py [manual] Rename Django app from zephyr to zerver. 2013-08-06 07:39:36 -04:00
0030_auto__chg_field_userprofile_last_reminder.py [manual] Rename Django app from zephyr to zerver. 2013-08-06 07:39:36 -04:00
0031_auto__add_field_userprofile_rate_limits.py [manual] Rename Django app from zephyr to zerver. 2013-08-06 07:39:36 -04:00
0032_auto__add_field_userprofile_avatar_source.py [manual] Rename Django app from zephyr to zerver. 2013-08-06 07:39:36 -04:00
0033_remove_postgres_zephyr_message_full_text_idx.py [manual] Rename Django app from zephyr to zerver. 2013-08-06 07:39:36 -04:00
0034_change_search_stopwords.py [manual] Change references to the humbug user, schema, and database to zulip 2013-10-26 04:16:27 -04:00
0035_auto__add_field_userprofile_is_superuser.py [manual] Rename Django app from zephyr to zerver. 2013-08-06 07:39:36 -04:00
0036_async_fts_update.py [manual] Change references to the humbug user, schema, and database to zulip 2013-10-26 04:16:27 -04:00
0037_auto__add_field_preregistrationuser_realm.py [manual] Rename Django app from zephyr to zerver. 2013-08-06 07:39:36 -04:00
0038_auto__add_referral__add_field_userprofile_invites_granted__add_field_u.py [manual] Rename Django app from zephyr to zerver. 2013-08-06 07:39:36 -04:00
0039_rename_database_tables.py [manual] Rename Django app from zephyr to zerver. 2013-08-06 07:39:36 -04:00
0040_auto__add_field_stream_email_token.py [schema] models: add an email_token field to Streams. 2013-08-09 14:59:26 -04:00
0041_auto__chg_field_stream_email_token.py [schema][manual] Make Stream.email_token required. 2013-08-13 14:28:47 -04:00
0042_auto__add_realmemoji__add_unique_realmemoji_realm_name.py [migration] Add RealmEmoji model for realm-specific emoji. 2013-08-23 21:39:29 -04:00
0043_auto__add_field_userprofile_alert_words.py [schema] Add backend support for per-user alert words 2013-09-05 10:18:40 -04:00
0044_auto__add_useractivityinterval.py [schema] Collect data on when users are active on site. 2013-09-10 13:25:59 -04:00
0045_auto__add_field_userprofile_muted_topics.py [schema] Add muted_topics to UserProfile 2013-09-11 16:47:37 -04:00
0046_auto__add_field_realm_date_created.py [schema] Add a date_created field to Realm. 2013-09-24 16:19:52 -04:00
0047_auto__add_field_stream_date_created.py [schema] Add a date_created field to zerver_stream. 2013-09-27 16:23:56 -04:00
0048_auto__add_field_realm_notifications_stream.py [schema] Give new realms a default notifications stream, and send signups/creations to it 2013-10-07 15:46:13 -04:00
0049_auto__chg_field_stream_name.py [schema] Increase maximum stream name length to 60. 2013-10-15 09:13:35 -04:00
0050_auto__add_appledevicetoken.py [schema] Add support for keeping track of iOS APNS device tokens 2013-10-16 12:54:28 -04:00
0051_auto__add_field_realm_name.py [schema] Add a name field to zerver_realm. 2013-10-17 13:47:51 -04:00
0052_subject_case_index.py [schema] Add case-insensitive index on message subject field. 2013-10-18 16:38:31 -04:00
0053_stream_name_case_index.py [schema] Add case-insensitive index on stream names. 2013-10-18 16:38:31 -04:00
0054_auto__add_field_userprofile_enable_offline_push_notifications.py [schema] Add a config option for enabling/disabling push notifications 2013-10-24 14:54:30 -04:00
0055_auto__add_field_appledevicetoken_last_updated.py [schema] Add a last_updated field to AppleDeviceToken 2013-10-24 14:54:30 -04:00
0056_auto__del_field_usermessage_archived.py [schema] Remove the UserMessage.archived field. 2013-11-04 07:31:11 -05:00
0057_auto__add_realmalias.py [schema] Allow a realm to have aliases for multiple other domains 2013-11-13 14:17:43 -05:00
0058_auto__add_scheduledjob.py [schema] Add ScheduledJob table, and update mandrill related code 2013-11-13 16:41:36 -05:00
0059_auto__add_field_userprofile_enable_digest_emails.py [schema] add boolean field enable_digest_emails to UserProfile. 2013-12-02 18:58:03 -05:00
0060_auto__add_realmfilter__add_unique_realmfilter_realm_pattern.py [schema] Add data model for managing realm filters via the database. 2013-12-11 14:39:09 -05:00
0061_auto__add_pushdevicetoken.py [schema] Modify device token to support both iOS and Android 2013-12-11 15:37:47 -05:00
0062_auto__add_field_userprofile_autoscroll_forever.py [schema] Add enable_autoscroll_past_unread setting 2013-12-13 11:50:03 -05:00
0063_auto__add_field_realm_deactivated.py [schema] Add a deactivated field to Realm. 2014-01-07 20:24:20 -05:00
0064_auto__add_field_userprofile_is_mirror_dummy.py [schema] Add a bit for whether inactive users are mirror dummies. 2014-01-09 11:08:35 -05:00
0065_auto__add_field_userprofile_default_desktop_notifications.py [schema] Add an per-user option to disable notification on new streams 2014-01-16 20:13:34 -05:00
0066_auto__add_field_stream_description.py [schema] Add description to streams and display it 2014-01-24 14:47:44 -05:00
0067_auto__add_field_stream_deactivated.py Add missing stream field to schema migration 0067. 2014-02-05 13:35:41 -05:00
0068_auto__add_field_message_has_attachment__add_field_message_has_image__a.py [schema] Add has_attachment/has_image/has_link to Message. 2014-03-01 12:41:00 -05:00
0069_create_zerver_message_indices.py [schema] Create new Message indices for development machines 2014-03-01 12:41:45 -05:00
0070_auto__add_field_userprofile_enable_stream_desktop_notifications__add_f.py [schema] Add separate notification settings for streams. 2014-03-03 16:08:30 -05:00
0071_auto__add_field_subscription_desktop_notifications__add_field_subscrip.py [schema] Split Subscription notifications field into audible + desktop. 2014-03-03 16:08:31 -05:00
0072_auto__add_field_userprofile_default_sending_stream.py [schema] Add a default to stream option to user profile 2014-03-05 14:16:18 -05:00
0073_auto__add_field_userprofile_default_events_register_stream__add_field_.py [schema] Add default user_profile options for register events 2014-03-05 14:16:18 -05:00
0074_turn_off_gin_fast_update_for_zephyr_message_search_tsvector.py [manual] Turn off GIN fast update for zephyr_message_search_tsvector 2014-05-20 22:38:48 -07:00
__init__.py [manual] Rename Django app from zephyr to zerver. 2013-08-06 07:39:36 -04:00