You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PostgreSQL Database Backend Section Requires some additional info on fallback hosts #25461
Airflow uses SQLAlchemy - which in turn uses Psycopg2 for database communication with PostgreSQL backend
It is possible to use multiple database hosts where a High Availability (HA) is required - i.e. a primary database host and one/multiple secondary hosts for a postgreSQL ecosystem. The objective is - when and if the primary database host is unavailable, the connection is retried with the newly-elected primary host to restore database connectivity.
It is possible to have multiple fallback hosts in PostgreSQL so that any loss of primary hosts does not impact your Airflow operation. Airflow currently uses SQLAlchemy for database session management. Please refer to their documentation here for more information.
known issue in SQLAlchemy - sqlalchemy/sqlalchemy#4392 (Related to multiple host URL specification)
Anything else
The issue currently occurs for any Airflow version, especially with multiple fallback hosts for metadata DBs
There is an ongoing bugfix in SQLAlchemy which will ensure that:
a. URL Specification in psycopg2 is implemented correctly
b. Documentation in SQLAlchemy is consistent, so that users do not get mislead
I am requesting a thorough code review at airflow side, as I am not a Python developer, and do not fully understand how the code is written. I am happy to submit a PR on documentation change, if this ticket is considered valuable.
Feel free to add it. BTW. There is no need to add issue. We are PR-driven, not issue-driven. If you make a PR and it's good, accepted and reviewed, we will merge it.
We are not beauracratic - unless something is a huge change, then it requires a devlist discussion and voting, but if it's a dccumentation update you can just submit it as is, without creating issue first.
This is not meant to discourage your contribution — quite the opposite! You are still very welcome to work on this issue and submit a PR for it. Simply comment that you are working on it and open a PR when ready.
We found that formal assignments were not working well, as they often prevented others from contributing when the assignee was not actively working on the issue.
Activity
boring-cyborg commentedon Aug 2, 2022
Thanks for opening your first issue here! Be sure to follow the issue template!
potiuk commentedon Aug 2, 2022
Feel free to add it. BTW. There is no need to add issue. We are PR-driven, not issue-driven. If you make a PR and it's good, accepted and reviewed, we will merge it.
We are not beauracratic - unless something is a huge change, then it requires a devlist discussion and voting, but if it's a dccumentation update you can just submit it as is, without creating issue first.
potiuk commentedon Aug 2, 2022
BTW. Since you created the issue, please refer to it (by number) in your PR so that it will be closed automatically when we merge it.
potiuk commentedon Mar 2, 2026
@manmedia We are unassigning you from this issue as part of our updated assignment policy.
This is not meant to discourage your contribution — quite the opposite! You are still very welcome to work on this issue and submit a PR for it. Simply comment that you are working on it and open a PR when ready.
We found that formal assignments were not working well, as they often prevented others from contributing when the assignee was not actively working on the issue.
54 remaining items