I have a python application which uses postgres and works fine in a conda envirnment based on python 3.7.3. I am trying to update its conda environment to use a newer python version. I built the new environment ground up by repeatedly running the application to find missing packages and the installing them. Executing this script in the new environment:
import psycopg2 conn = psycopg2.connect("dbname='template1' user='dbuser' host='localhost' password='dbpass'")
Produces: double free or corruption (out) Aborted (core dumped) in the connect.
The postgres version is 10. I see this in /var/log/postgressql/postgresql-10-main.log evey time it's run: 2023-12-07 10:05:52.855 GMT [6618] [unknown]@[unknown] FATAL: no PostgreSQL user name specified in startup packet
psycopg2.version '2.9.9 (dt dec pq3 ext lo64)' python --version Python 3.11.6
Whether or not the username is correct, it shouldn't cause a core dump. Any help appreciated.
psycopg2
useslibpq
which is backwards compatible to Postgres 7.4, so it will handle Postgres 10. 2) How did you installpsycopg2
? 3) Did you reinstall/rebuild it when you changed the Cond env? – Dreda