Changes between Initial Version and Version 1 of Ticket #37437
- Timestamp:
- Oct 20, 2026, 5:16:19 AM (3 weeks ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #37437 – Description
initial v1 7 7 Minimal reproduction (role `app_role` exists and is granted to `owner`): 8 8 9 ```python9 {{{#!python 10 10 import django 11 11 from django.conf import settings … … 21 21 with connection.cursor() as c: # OperationalError: couldn't get a connection after 5.00 sec 22 22 c.execute("SELECT current_user") 23 ``` 23 }}} 24 24 25 25 Removing `assume_role` (keeping `pool`) works. Removing `pool` (keeping 26 26 `assume_role`) works. 27 27 28 Cause 29 ----- 28 **Cause** 29 30 30 The pool is created with `configure=self._configure_connection`. For a new 31 31 connection, `_configure_role(connection)` builds the statement with … … 50 50 `no_pool_connection()`. 51 51 52 Impact 53 ------ 52 **Impact** 53 54 54 - With pooling enabled, the database is unusable as soon as `assume_role` is set. 55 55 - In addition, psycopg_pool does not close the connection when `configure`