SQLAlchemy Core Engine and ORM Session: Pool Recycle Behavior with Non-Thread-Safe Drivers
Interoperability Question When using SQLAlchemy 2.x with a non-thread-safe DBAPI driver such as psycopg2, the Core Engine and ORM Session share the same QueuePool instance. The documented pool_recycle parameter defaults to 0 , which disables automatic recycling and allows connections to persist beyond the database server's idle timeout. This creates an inter