Sujet : Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)
De : jon+usenet (at) *nospam* unequivocal.eu (Jon Ribbens)
Groupes : comp.lang.pythonDate : 09. Sep 2024, 21:00:17
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <slrnvduhe0.4dt.jon+usenet@raven.unequivocal.eu>
References : 1 2 3 4 5 6 7 8 9 10 11 12
User-Agent : slrn/1.0.3 (Linux)
On 2024-09-09, Karsten Hilbert <
Karsten.Hilbert@gmx.net> wrote:
Am Mon, Sep 09, 2024 at 10:00:11AM -0000 schrieb Jon Ribbens via Python-list:
So the Python code is half-way through a transaction when it throws
a (non-database-related) exception and that thread of execution is
aborted. The database connection returns to the pool,
>
How does it return to the pool ?
It's just any circumstance in which a bit of your code uses a database
"cursor" (which isn't a cursor) that it didn't create moments before.