Set thread_id column to non-null for event_push_{actions,actions_staging,summary} (#15597)
Updates the database schema to require a thread_id (by adding a constraint that the column is non-null) for event_push_actions, event_push_actions_staging, and event_push_actions_summary. For PostgreSQL we add the constraint as NOT VALID, then VALIDATE the constraint a background job to avoid locking the table during an upgrade. Each table is updated as a separate schema delta to avoid deadlocks between them. For SQLite we simply rebuild the table & copy the data.
Showing
- changelog.d/15597.misc 1 addition, 0 deletionschangelog.d/15597.misc
- synapse/storage/background_updates.py 44 additions, 0 deletionssynapse/storage/background_updates.py
- synapse/storage/databases/main/event_push_actions.py 31 additions, 223 deletionssynapse/storage/databases/main/event_push_actions.py
- synapse/storage/schema/__init__.py 3 additions, 0 deletionssynapse/storage/schema/__init__.py
- synapse/storage/schema/main/delta/77/05thread_notifications_backfill.sql 28 additions, 0 deletions.../schema/main/delta/77/05thread_notifications_backfill.sql
- synapse/storage/schema/main/delta/77/06thread_notifications_not_null.sql.sqlite 102 additions, 0 deletions.../main/delta/77/06thread_notifications_not_null.sql.sqlite
- synapse/storage/schema/main/delta/77/06thread_notifications_not_null_event_push_actions.sql.postgres 27 additions, 0 deletions...ad_notifications_not_null_event_push_actions.sql.postgres
- synapse/storage/schema/main/delta/77/06thread_notifications_not_null_event_push_actions_staging.sql.postgres 27 additions, 0 deletions...ications_not_null_event_push_actions_staging.sql.postgres
- synapse/storage/schema/main/delta/77/06thread_notifications_not_null_event_push_summary.sql.postgres 29 additions, 0 deletions...ad_notifications_not_null_event_push_summary.sql.postgres
Loading
Please register or sign in to comment