vatsrahul1001 opened a new issue, #63549: URL: https://github.com/apache/airflow/issues/63549
### Apache Airflow version main (development) ### If "Other Airflow 3 version" selected, which one? _No response_ ### What happened? Migration 0101_3_2_0_ui_improvements_for_deadlines upgrade is slow on deployments with large deadline and serialized_dag tables. With 10M deadline rows and 100K serialized_dags, the migration took ~16 minutes. The UPDATE phase holds row-level locks on all deadline rows for ~7 minutes, and the subsequent ALTER COLUMN ... SET NOT NULL acquires ACCESS EXCLUSIVE lock which blocks all reads and writes to the deadline table. ### What you think should happen instead? _No response_ ### How to reproduce Steps to reproduce: 1. Start Airflow on 3.1.8 with PostgreSQL backend 2. Accumulate deadline rows and serialized_dag entries (100K+ deadlines to see noticeable impact) 3. Upgrade to 3.2.0 (airflow db migrate) 4. Observe migration 0101 duration scales linearly with deadline row count ### Operating System MAc ### Versions of Apache Airflow Providers _No response_ ### Deployment Official Apache Airflow Helm Chart ### Deployment details _No response_ ### Anything else? _No response_ ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [x] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
