1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

[1.11.x] Fixed #28062 -- Added a setting to disable server-side cursors on PostgreSQL.

When a connection pooler is set up in transaction pooling mode, queries
relying on server-side cursors fail. The DISABLE_SERVER_SIDE_CURSORS
setting in DATABASES disables server-side cursors for this use case.

Backport of 88336fdbb5 from master
This commit is contained in:
François Freitag
2017-05-05 19:19:34 -07:00
committed by Tim Graham
parent f9a4593376
commit 6a2624286b
7 changed files with 98 additions and 2 deletions

View File

@@ -2041,6 +2041,11 @@ won't cache results after iterating over them. Oracle and :ref:`PostgreSQL
<postgresql-server-side-cursors>` use server-side cursors to stream results
from the database without loading the entire result set into memory.
On PostgreSQL, server-side cursors will only be used when the
:setting:`DISABLE_SERVER_SIDE_CURSORS <DATABASE-DISABLE_SERVER_SIDE_CURSORS>`
setting is ``False``. Read :ref:`transaction-pooling-server-side-cursors` if
you're using a connection pooler configured in transaction pooling mode.
.. versionchanged:: 1.11
PostgreSQL support for server-side cursors was added.