Skip to content

Switch the default async Postgres driver from asyncpg to psycopg3 (provider) - #69089

Merged
shahar1 merged 1 commit into
apache:mainfrom
Dev-iL:2606/postgres-provider-psycopg3-default
Jul 4, 2026
Merged

Switch the default async Postgres driver from asyncpg to psycopg3 (provider)#69089
shahar1 merged 1 commit into
apache:mainfrom
Dev-iL:2606/postgres-provider-psycopg3-default

Conversation

@Dev-iL

@Dev-iLDev-iL commented Jun 27, 2026

Copy link
Copy Markdown
Collaborator

Split from the below, see details there:

Important

Note to RMs: this introduces a breaking change that requires a major version bump!

@Dev-iL
Dev-iL requested a review from shahar1June 28, 2026 09:13
@Dev-iL
Dev-iLforce-pushed the 2606/postgres-provider-psycopg3-default branch from 608e0e0 to 35697d5CompareJune 30, 2026 09:06
@Dev-iL
Dev-iL requested review from ashb, jscheffl and uranusjrJuly 1, 2026 06:48
@Dev-iLDev-iL added the ready for maintainer review Set after triaging when all criteria pass. label Jul 1, 2026
@Dev-iL
Dev-iLforce-pushed the 2606/postgres-provider-psycopg3-default branch from 35697d5 to ec31a5aCompareJuly 2, 2026 08:40
Comment threadproviders/postgres/docs/changelog.rst Outdated
uranusjr
uranusjr approved these changes Jul 2, 2026
@Dev-iL
Dev-iLforce-pushed the 2606/postgres-provider-psycopg3-default branch from ec31a5a to 0091e00CompareJuly 3, 2026 20:52
asyncpg moves to an opt-in extra of the postgres provider; psycopg (psycopg3) is now installed by default as the async metadata-database driver. This pairs with the Airflow 3.4.0 core change that derives postgresql+psycopg_async:// by default, which is safe behind transaction-mode PgBouncer with no extra configuration.
@Dev-iL
Dev-iLforce-pushed the 2606/postgres-provider-psycopg3-default branch from 0091e00 to f09ad01CompareJuly 4, 2026 05:16
@shahar1
shahar1 merged commit 4fe401c into apache:mainJul 4, 2026
94 checks passed
@Dev-iL
Dev-iL deleted the 2606/postgres-provider-psycopg3-default branch July 4, 2026 15:37
Dev-iL added a commit to Dev-iL/airflow that referenced this pull request Jul 6, 2026
Mirrors the async default switch (apache#69089): PostgresHook no longer
requires psycopg2 at import time. The psycopg2-specific connection,
cursor, and execute_values imports are now lazy/guarded and raise a
clear AirflowOptionalProviderFeatureException if psycopg2 genuinely
needs to be used but isn't installed. psycopg2-binary moves to a new
[psycopg2] extra.
Part of the migration tracked in apache#68453.
Dev-iL added a commit to Dev-iL/airflow that referenced this pull request Jul 6, 2026
Mirrors the async default switch (apache#69089): PostgresHook no longer
requires psycopg2 at import time. The psycopg2-specific connection,
cursor, and execute_values imports are now lazy/guarded and raise a
clear AirflowOptionalProviderFeatureException if psycopg2 genuinely
needs to be used but isn't installed. psycopg2-binary moves to a new
[psycopg2] extra.
Part of the migration tracked in apache#68453.
Dev-iL added a commit to Dev-iL/airflow that referenced this pull request Jul 7, 2026
Mirrors the async default switch (apache#69089): PostgresHook no longer
requires psycopg2 at import time. The psycopg2-specific connection,
cursor, and execute_values imports are now lazy/guarded and raise a
clear AirflowOptionalProviderFeatureException if psycopg2 genuinely
needs to be used but isn't installed. psycopg2-binary moves to a new
[psycopg2] extra.
Part of the migration tracked in apache#68453.
Dev-iL added a commit to Dev-iL/airflow that referenced this pull request Jul 7, 2026
Mirrors the async default switch (apache#69089): PostgresHook no longer
requires psycopg2 at import time. The psycopg2-specific connection,
cursor, and execute_values imports are now lazy/guarded and raise a
clear AirflowOptionalProviderFeatureException if psycopg2 genuinely
needs to be used but isn't installed. psycopg2-binary moves to a new
[psycopg2] extra.
Part of the migration tracked in apache#68453.
Dev-iL added a commit to Dev-iL/airflow that referenced this pull request Jul 7, 2026
Mirrors the async default switch (apache#69089): PostgresHook no longer
requires psycopg2 at import time. The psycopg2-specific connection,
cursor, and execute_values imports are now lazy/guarded and raise a
clear AirflowOptionalProviderFeatureException if psycopg2 genuinely
needs to be used but isn't installed. psycopg2-binary moves to a new
[psycopg2] extra.
Part of the migration tracked in apache#68453.
Dev-iL added a commit to Dev-iL/airflow that referenced this pull request Jul 8, 2026
Mirrors the async default switch (apache#69089): PostgresHook no longer
requires psycopg2 at import time. The psycopg2-specific connection,
cursor, and execute_values imports are now lazy/guarded and raise a
clear AirflowOptionalProviderFeatureException if psycopg2 genuinely
needs to be used but isn't installed. psycopg2-binary moves to a new
[psycopg2] extra.
Part of the migration tracked in apache#68453.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@Dev-iL@uranusjr@shahar1