Changes between Version 1 and Version 2 of Ticket #31518


Ignore:
Timestamp:
Apr 26, 2020, 9:45:58 PM (4 years ago)
Author:
Curtis Maloney
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #31518 – Description

    v1 v2  
    33In `django.contrib.postgres.apps.PostgresConfig` the `ready` function iterates `django.db.connections`, checking if each connection has vendor == 'postgres'.
    44
    5 This creates a connection per configured DB. It then does nothing to close them afterwards.
     5This creates a backend per configured DB. It then does nothing to close them afterwards.
    66
    77This means the first connection to all DBs is once Django's setup is complete, not the first request.
     
    1313## Possible steps:
    1414
    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.
     151. document this behavior - we should do this anyway
     162. make the `ready` function _close_ connections once done.
    1817
    19 I have begun a patch for (2), and will implement the rest once someone agrees with this solution.
     18I have begun a patch, and will implement the rest once someone agrees with this solution.
Back to Top