This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 5344881715 Make postgresql default engine args comply with SA 2.0
(#38362)
5344881715 is described below
commit 5344881715156b98521706b2facb261a499f2e4b
Author: Andrey Anshin <[email protected]>
AuthorDate: Fri Mar 22 21:51:27 2024 +0400
Make postgresql default engine args comply with SA 2.0 (#38362)
* Change Postgres default executemany_mode to 'values_plus_batch'
* executemany_values_page_size > insertmanyvalues_page_size for SA20
---
airflow/settings.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/airflow/settings.py b/airflow/settings.py
index 6cbf6126e0..2a2b1455bc 100644
--- a/airflow/settings.py
+++ b/airflow/settings.py
@@ -273,8 +273,8 @@ def configure_orm(disable_connection_pool=False,
pool_class=None):
DEFAULT_ENGINE_ARGS = {
"postgresql": {
- "executemany_mode": "values",
- "executemany_values_page_size": 10000,
+ "executemany_mode": "values_plus_batch",
+ "executemany_values_page_size" if is_sqlalchemy_v1() else
"insertmanyvalues_page_size": 10000,
"executemany_batch_page_size": 2000,
},
}