Changes between Initial Version and Version 1 of Ticket #36957
- Timestamp:
- Feb 27, 2026, 4:00:35 AM (4 hours ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #36957 – Description
initial v1 1 Django's PostgreSQL backend stores psycopg_pool.ConnectionPool objects in a class-level dict (DatabaseWrapper._connection_pools). When gunicorn (or any pre-forking server) forks worker processes, all children inherit references to the same pool objects — and crucially, the same underlying TCP sockets to PostgreSQL. Multiple workers then read/write the same socket concurrently, corrupting the PostgreSQL wire protocol.1 Django's PostgreSQL backend stores `psycopg_pool.ConnectionPool` objects in a class-level dict (`DatabaseWrapper._connection_pools`). When gunicorn (or any pre-forking server) forks worker processes, all children inherit references to the same pool objects — and crucially, the same underlying TCP sockets to PostgreSQL. Multiple workers then read/write the same socket concurrently, corrupting the PostgreSQL wire protocol. 2 2 3 3 … … 36 36 Python 3.12 – 3.14 37 37 38 The minimal reproducible example project is in the attachments 39