]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- verbiage expressing that pool_size==0 means no limit; NullPool is
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 2 Jul 2010 18:16:08 +0000 (14:16 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 2 Jul 2010 18:16:08 +0000 (14:16 -0400)
used to disable pooling. [ticket:1164]

lib/sqlalchemy/engine/__init__.py
lib/sqlalchemy/pool.py

index 18b25fbaa3f81d72972e29cf591df33e98c54885..b4894250f584e1847ab7d9cb7e45a38c8e9bd461 100644 (file)
@@ -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
index a802668a11d3e89844255fba6aec31344c7a2a47..b0d6e0b01a1ed0b8492bff44b58318499f7ecd4f 100644 (file)
@@ -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