Skip to content

postgres provider: use non-binary psycopg2 (recommended for production use) #25712

Description

@brki

Apache Airflow Provider(s)

postgres

Versions of Apache Airflow Providers

apache-airflow-providers-postgres==5.0.0

Apache Airflow version

2.3.3

Operating System

Debian 11 (airflow docker image)

Deployment

Official Apache Airflow Helm Chart

Deployment details

No response

What happened

psycopg2-binary package is installed.

What you think should happen instead

psycopg (non-binary) package is installed.

According to the psycopg2 docs, (emphasis theirs) "For production use you are advised to use the source distribution.".

How to reproduce

Either

docker run -it apache/airflow:2.3.3-python3.10
pip freeze |grep -E '(postgres|psycopg2)'

Or

docker run -it apache/airflow:slim-2.3.3-python3.10
curl -O curl https://raw.githubusercontent.com/apache/airflow/constraints-2.3.3/constraints-3.10.txt
pip install -c constraints-3.10.txt apache-airflow-providers-postgres
pip freeze |grep -E '(postgres|psycopg2)'

Either way, the output is:

apache-airflow-providers-postgres==5.0.0
psycopg2-binary==2.9.3

Anything else

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions