Skip to content

Add a single ops feature flag to disable all ddl across the gitlab database

During postgres upgrades, DBREs need to turn off a large quantity of feature flags, for example (not an exhaustive list):

  • async_foreign_key
  • async_index
  • partition_manager_sync_partitions

For future upgrades and other database maintenance procedures, this list could grow, and it becomes unwieldy to remember all the flags.

Deliverables

  • Identify and enumerate places we perform DDL within the application.
    • partition_manager_sync_partitions
    • execute_batched_migrations_on_schedule
    • execute_background_migrations
    • database_reindexing
    • database_async_index_operations
    • database_async_foreign_key_validation
    • database_async_index_creation
  • Introduce a single flag that, when disabled, disables all ddl across the database.
  • Existing feature flags still work as expected, disabling individual features
  • Document the flag... somewhere?