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-iL Dev-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 shahar1 June 28, 2026 09:13
@Dev-iL Dev-iL force-pushed the 2606/postgres-provider-psycopg3-default branch from 608e0e0 to 35697d5 Compare June 30, 2026 09:06
@Dev-iL Dev-iL requested review from ashb, jscheffl and uranusjr July 1, 2026 06:48
@Dev-iL Dev-iL added the ready for maintainer review Set after triaging when all criteria pass. label Jul 1, 2026
@Dev-iL Dev-iL force-pushed the 2606/postgres-provider-psycopg3-default branch from 35697d5 to ec31a5a Compare July 2, 2026 08:40
Comment thread providers/postgres/docs/changelog.rst Outdated
uranusjr
uranusjr approved these changes Jul 2, 2026
@Dev-iL Dev-iL force-pushed the 2606/postgres-provider-psycopg3-default branch from ec31a5a to 0091e00 Compare July 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-iL force-pushed the 2606/postgres-provider-psycopg3-default branch from 0091e00 to f09ad01 Compare July 4, 2026 05:16
@shahar1 shahar1 merged commit 4fe401c into apache:main Jul 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 free to 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