Taragolis commented on issue #23361: URL: https://github.com/apache/airflow/issues/23361#issuecomment-1193405064
> Can you do it cross-db (MySQL/Postgres/MsSQL?) and in sqlalchemy? @Taragolis ? I do not actually know about is it supported by other DB engine and is it has exactly the same behaviour. Definitely it works with all modern PostgreSQL (9.3+) and [sqlalchemy](https://docs.sqlalchemy.org/en/14/changelog/migration_11.html#support-for-for-update-skip-locked-for-no-key-update-for-key-share), basically we need to set `key_share=True`. One of the difference that with `FOR NO KEY UPDATE` we can insert/delete new record if it referenced (FK) to locked value in other table, if use `FOR UPDATE` then transaction would lock until row would released and this also could cause in some cases Deadlocks. Might be `FOR UPDATE` strictly required for HA in Airflow, unfortunately I do not check this yet (that why I ask). I recently have some performance issues when row level locks on and tasks access in templates to `dag_run` and `ti` on LocalExecutor. -- 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]
