galaxyproject / ansible-postgresql

An Ansible role for managing a PostgreSQL server
https://galaxy.ansible.com/galaxyproject/postgresql
122 stars 58 forks source link

PGDG repo version conflicts with psycopg2 #26

Open natefoo opened 3 years ago

natefoo commented 3 years ago

Each PGDG repo contains versions of python-psycopg2, python2-psycopg2, and python3-psycopg2 for the version of PostgreSQL in that repo. When you yum update sometimes it installs a version of psycopg2 from the wrong version's repo. It should match the version of PostgreSQL you've installed, but sometimes it doesn't.

You can fix this with yum install --disablerepo '*' --enablerepo pgdg12 python-psycopg2 (using the correct enablerepo for whatever version of PostgreSQL you've installed).

We should probably have the role set the enabled properly in the yum repo files for the desired and undesired versions of PostgreSQL.