diff options
author | sumau <soumaya.mauthoor@gmail.com> | 2019-10-28 15:22:08 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2019-10-30 10:50:44 -0400 |
commit | d36b1f7f03841b9b346a6fd3395dd29333dce588 (patch) | |
tree | 507f1cca6605dcb767074f0adfdf883fa2ace164 /lib/sqlalchemy/dialects/postgresql/psycopg2.py | |
parent | 12623517def001caa275c2af172405e336c731ab (diff) | |
download | sqlalchemy-d36b1f7f03841b9b346a6fd3395dd29333dce588.tar.gz |
Use simple growth scale with any max size for BufferedRowResultProxy
The maximum buffer size for the :class:`.BufferedRowResultProxy`, which
is used by dialects such as PostgreSQL when ``stream_results=True``, can
now be set to a number greater than 1000 and the buffer will grow to
that size. Previously, the buffer would not go beyond 1000 even if the
value were set larger. The growth of the buffer is also now based
on a simple multiplying factor currently set to 5. Pull request courtesy
Soumaya Mauthoor.
Fixes: #4914
Closes: #4930
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/4930
Pull-request-sha: 66841f56e967c784f7078a787cec5129462006c8
Change-Id: I6286220bd9d488027fadc444039421a410e19a19
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql/psycopg2.py')
-rw-r--r-- | lib/sqlalchemy/dialects/postgresql/psycopg2.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sqlalchemy/dialects/postgresql/psycopg2.py b/lib/sqlalchemy/dialects/postgresql/psycopg2.py index 1a4db1108..14d49ee15 100644 --- a/lib/sqlalchemy/dialects/postgresql/psycopg2.py +++ b/lib/sqlalchemy/dialects/postgresql/psycopg2.py @@ -137,7 +137,8 @@ The following DBAPI-specific options are respected when used with interpreted by the :class:`.BufferedRowResultProxy`, and if omitted the buffer will grow to ultimately store 1000 rows at a time. - .. versionadded:: 1.0.6 + .. versionchanged:: 1.4 The ``max_row_buffer`` size can now be greater than + 1000, and the buffer will grow to that size. .. _psycopg2_executemany_mode: |