Shrink psycopg-pool to (0, 1) when cleaning connections
When min size is zero, max size must be greater than 0. Closes #14795 (grafted from 357525621ea68bc99d688ddf04f9912905c9f3a0) --HG-- branch : 8.0
This commit is contained in:
@@ -221,7 +221,7 @@ class Database(DatabaseInterface):
|
||||
for database in list(databases.values()):
|
||||
if ((now - database._last_use).total_seconds() > timeout
|
||||
and database.name != name):
|
||||
database._connpool.resize(0, 0)
|
||||
database._connpool.resize(0, 1)
|
||||
|
||||
if not (inst := databases.get(name)):
|
||||
with cls._lock:
|
||||
|
||||
Reference in New Issue
Block a user