psycopg / psycopg2

PostgreSQL database adapter for the Python programming language

Home Page:https://www.psycopg.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

psycopg2.ProgrammingError: the connection cannot be re-entered recursively

Spoonrad opened this issue · comments

I tried upgrading from 2.8.4 to 2.9.1 and running my project led to the following Exception being raised:
psycopg2.ProgrammingError: the connection cannot be re-entered recursively

I understand what the error means (calling with conn inside of with conn) but it's going to take us a bit of time to fix, so we're staying on 2.8.4 for now.

I was just wondering if keeping this in our code could lead to issues until we fix it and upgrade.

Thank you!

The behaviour of the recursive with conn was unspecified in 2.8, now it is specified. It was no-op, and will remain no-op in possible but unlikely 2.8.x releases. It will consistently raise an exception in 2.9.