Changes between Initial Version and Version 1 of Ticket #37437


Ignore:
Timestamp:
Oct 20, 2026, 5:16:19 AM (3 weeks ago)
Author:
Sarah Boyce
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #37437 – Description

    initial v1  
    77Minimal reproduction (role `app_role` exists and is granted to `owner`):
    88
    9 ```python
     9{{{#!python
    1010import django
    1111from django.conf import settings
    … …  
    2121with connection.cursor() as c:  # OperationalError: couldn't get a connection after 5.00 sec
    2222    c.execute("SELECT current_user")
    23 ```
     23}}}
    2424
    2525Removing `assume_role` (keeping `pool`) works. Removing `pool` (keeping
    2626`assume_role`) works.
    2727
    28 Cause
    29 -----
     28**Cause**
     29
    3030The pool is created with `configure=self._configure_connection`. For a new
    3131connection, `_configure_role(connection)` builds the statement with
    … …  
    5050`no_pool_connection()`.
    5151
    52 Impact
    53 ------
     52**Impact**
     53
    5454- With pooling enabled, the database is unusable as soon as `assume_role` is set.
    5555- In addition, psycopg_pool does not close the connection when `configure`
Back to Top