root: Add setting to adjust database config for pgpool (#6949)

This commit is contained in:
boesr
2023-09-21 12:54:18 +02:00
committed by GitHub
parent 9ab3f26082
commit a32755b6c8
3 changed files with 5 additions and 0 deletions

View File

@ -279,6 +279,9 @@ DATABASES = {
}
}
if CONFIG.get_bool("postgresql.use_pgpool", False):
DATABASES["default"]["DISABLE_SERVER_SIDE_CURSORS"] = True
if CONFIG.get_bool("postgresql.use_pgbouncer", False):
# https://docs.djangoproject.com/en/4.0/ref/databases/#transaction-pooling-server-side-cursors
DATABASES["default"]["DISABLE_SERVER_SIDE_CURSORS"] = True