Last active
June 27, 2024 12:19
-
-
Save katiayn/646e9f6ae37c6471ef704d7dd9e79dc4 to your computer and use it in GitHub Desktop.
What's new in Django 5.1: PostgreSQL Connection Pools
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# <project>/settings.py | |
DATABASES = { | |
"default": { | |
"ENGINE": "django.db.backends.postgresql", | |
# ... | |
"OPTIONS": { | |
"pool": { | |
"min_size": 2, | |
"max_size": 4, | |
"timeout": 10, | |
} | |
}, | |
}, | |
} | |
# or | |
DATABASES = { | |
"default": { | |
"ENGINE": "django.db.backends.postgresql", | |
# ... | |
"OPTIONS": { | |
"pool": True, | |
}, | |
}, | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment