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
#67801 switches the async Postgres driver default from asyncpg to psycopg3 (postgresql+psycopg_async://) and makes psycopg[binary] a hard dependency of apache-airflow-providers-postgres. To keep that PR reviewable, psycopg2-binary was deliberately kept as a hard dependency and the sync engine still uses psycopg2 (postgresql+psycopg2://, made explicit in #68314). This issue tracks the deferred follow-up: removing psycopg2 entirely and serving both sync and async from psycopg3.
Why deferred (and why it should happen)
Keeping both drivers doubles the installed footprint for no long-term benefit; psycopg3 serves sync and async from a single driver.
SQLAlchemy 2.1 changes the default dialect for postgresql:// URLs from psycopg2 to psycopg3, so the sync migration naturally aligns with the SQLA 2.1 upgrade (early experiments with that upgrade already surfaced breakage, e.g. in celery, from the implicit driver flip — hence the explicit-URL groundwork in Make PostgreSQL SQLAlchemy driver explicit (postgresql+psycopg2://) #68314).
Work
Migrate the sync metadata engine default to psycopg3 (postgresql+psycopg://).
Remove psycopg2-binary from providers/postgres hard dependencies (breaking change — major provider bump).
Auto-upgrade legacy URLs: once psycopg2 is no longer guaranteed to be installed, postgresql:// (and postgresql+psycopg2://) connection URLs must be automatically mapped to postgresql+psycopg:// when psycopg2 is absent, so existing deployment configs keep working.
Context
#67801 switches the async Postgres driver default from asyncpg to psycopg3 (
postgresql+psycopg_async://) and makespsycopg[binary]a hard dependency ofapache-airflow-providers-postgres. To keep that PR reviewable,psycopg2-binarywas deliberately kept as a hard dependency and the sync engine still uses psycopg2 (postgresql+psycopg2://, made explicit in #68314). This issue tracks the deferred follow-up: removing psycopg2 entirely and serving both sync and async from psycopg3.Why deferred (and why it should happen)
postgresql://URLs from psycopg2 to psycopg3, so the sync migration naturally aligns with the SQLA 2.1 upgrade (early experiments with that upgrade already surfaced breakage, e.g. in celery, from the implicit driver flip — hence the explicit-URL groundwork in Make PostgreSQL SQLAlchemy driver explicit (postgresql+psycopg2://) #68314).Work
postgresql+psycopg://).psycopg2-binaryfromproviders/postgreshard dependencies (breaking change — major provider bump).postgresql://(andpostgresql+psycopg2://) connection URLs must be automatically mapped topostgresql+psycopg://when psycopg2 is absent, so existing deployment configs keep working.PostgresHookas applicable.Acceptance criteria for closing
postgresql:///postgresql+psycopg2://configs either keep working via auto-upgrade or fail with a clear actionable error.