uranusjr commented on code in PR #68496:
URL: https://github.com/apache/airflow/pull/68496#discussion_r3408975529
##########
airflow-core/docs/howto/set-up-database.rst:
##########
@@ -206,6 +206,41 @@ We recommend using the ``psycopg2`` driver and specifying
it in your SqlAlchemy
postgresql+psycopg2://<user>:<password>@<host>/<db>
+Async SQLAlchemy engine and the async driver
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+In addition to the synchronous engine, Airflow maintains an async SQLAlchemy
engine for the metadata database (used e.g. by async API endpoints).
+When ``[database] sql_alchemy_conn_async`` is not set, its URL is derived from
``sql_alchemy_conn`` using ``psycopg`` (psycopg3) as the async driver:
+
+.. code-block:: text
+
+ postgresql+psycopg_async://<user>:<password>@<host>/<db>
+
+psycopg3 is the default because it is safe behind transaction-mode PgBouncer
(recommended for all production Postgres installations, see the note below)
with no extra configuration.
Review Comment:
This should include a reference. (Both for why psycopg3 does and why another
engine e.g. asyncpg does not.)
--
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]