summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2010-07-02 14:16:08 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2010-07-02 14:16:08 -0400
commit786b35aaba530f61c289ab866a5454333a3450bd (patch)
treef9a23921c87c1bf614f8f667300b8b16f4ec0c23
parent0025a6a50eabe323c353681a1dd3949c8e57bb9b (diff)
downloadsqlalchemy-786b35aaba530f61c289ab866a5454333a3450bd.tar.gz
- verbiage expressing that pool_size==0 means no limit; NullPool is
used to disable pooling. [ticket:1164]
-rw-r--r--lib/sqlalchemy/engine/__init__.py5
-rw-r--r--lib/sqlalchemy/pool.py13
2 files changed, 12 insertions, 6 deletions
diff --git a/lib/sqlalchemy/engine/__init__.py b/lib/sqlalchemy/engine/__init__.py
index 18b25fbaa..b4894250f 100644
--- a/lib/sqlalchemy/engine/__init__.py
+++ b/lib/sqlalchemy/engine/__init__.py
@@ -215,7 +215,10 @@ def create_engine(*args, **kwargs):
:param pool_size=5: the number of connections to keep open
inside the connection pool. This used with :class:`~sqlalchemy.pool.QueuePool` as
- well as :class:`~sqlalchemy.pool.SingletonThreadPool`.
+ well as :class:`~sqlalchemy.pool.SingletonThreadPool`. With
+ :class:`~sqlalchemy.pool.QueuePool`, a ``pool_size`` setting
+ of 0 indicates no limit; to disable pooling, set ``poolclass`` to
+ :class:`~sqlalchemy.pool.NullPool` instead.
:param pool_recycle=-1: this setting causes the pool to recycle
connections after the given number of seconds has passed. It
diff --git a/lib/sqlalchemy/pool.py b/lib/sqlalchemy/pool.py
index a802668a1..b0d6e0b01 100644
--- a/lib/sqlalchemy/pool.py
+++ b/lib/sqlalchemy/pool.py
@@ -562,11 +562,14 @@ class QueuePool(Pool):
connection object. The function will be called with
parameters.
- :param pool_size: The size of the pool to be maintained. This
- is the largest number of connections that will be kept
- persistently in the pool. Note that the pool begins with no
- connections; once this number of connections is requested,
- that number of connections will remain. Defaults to 5.
+ :param pool_size: The size of the pool to be maintained,
+ defaults to 5. This is the largest number of connections that
+ will be kept persistently in the pool. Note that the pool
+ begins with no connections; once this number of connections
+ is requested, that number of connections will remain.
+ ``pool_size`` can be set to 0 to indicate no size limit; to
+ disable pooling, use a :class:`~sqlalchemy.pool.NullPool`
+ instead.
:param max_overflow: The maximum overflow size of the
pool. When the number of checked-out connections reaches the