Changes between Version 1 and Version 2 of Ticket #31518
- Timestamp:
- Apr 26, 2020, 9:45:58 PM (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #31518 – Description
v1 v2 3 3 In `django.contrib.postgres.apps.PostgresConfig` the `ready` function iterates `django.db.connections`, checking if each connection has vendor == 'postgres'. 4 4 5 This creates a connectionper configured DB. It then does nothing to close them afterwards.5 This creates a backend per configured DB. It then does nothing to close them afterwards. 6 6 7 7 This means the first connection to all DBs is once Django's setup is complete, not the first request. … … 13 13 ## Possible steps: 14 14 15 1. document this behavor - we should do this anyway 16 2. make the `ready` function get DB Backends and test their `vendor` attribute _before_ getting a connection. 17 3. make the `ready` function _close_ connections once done. 15 1. document this behavior - we should do this anyway 16 2. make the `ready` function _close_ connections once done. 18 17 19 I have begun a patch for (2), and will implement the rest once someone agrees with this solution.18 I have begun a patch, and will implement the rest once someone agrees with this solution.