Dev-iL commented on code in PR #70619:
URL: https://github.com/apache/airflow/pull/70619#discussion_r3681506300


##########
providers/amazon/docs/executors/general.rst:
##########
@@ -312,6 +312,24 @@ You will be prompted to enter the password if the 
connection is successful.
 .. END DATABASE_CONNECTION
 
 
+.. BEGIN SQL_ALCHEMY_CONN
+
+.. code-block:: bash
+
+   postgresql+psycopg2://<username>:<password>@<endpoint>/<database_name>
+
+The ``psycopg2`` driver above is valid on every Airflow version these 
executors support. From Airflow
+3.4.0, a driverless URL resolves to ``psycopg`` (psycopg3) where psycopg3 is 
installed and to
+``psycopg2`` otherwise. You may instead
+give an explicit ``postgresql+psycopg://`` URL from Airflow 3.2.0, provided 
psycopg3 is installed —
+whether it is depends on your ``apache-airflow-providers-postgres`` version. 
Do not use
+``postgresql+psycopg://`` before Airflow 3.2.0 at all: those releases can run 
on SQLAlchemy 1.4, which
+has no ``postgresql+psycopg`` dialect, so Airflow fails to start with
+``sqlalchemy.exc.NoSuchModuleError``.

Review Comment:
   Rephrased suggestion, feel free to adjust.
   
   ```suggestion
   The ``psycopg2`` driver is valid on every Airflow version these executors 
support. 
   
   Support for the ``psycopg`` (v3) driver was added in Airflow 3.2.0. To use 
this driver, ensure it is installed, then specify ``postgresql+psycopg://``. Do 
not use ``postgresql+psycopg://`` before Airflow 3.2.0 at all: those releases 
typically run on SQLAlchemy 1.4, which has no ``postgresql+psycopg`` dialect, 
so Airflow will fail to start with ``sqlalchemy.exc.NoSuchModuleError``.
   
   A driverless ``postgresql://`` URL resolves to ``psycopg2`` before Airflow 
3.4.0, and to ``psycopg`` after.
   ```



-- 
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]

Reply via email to