From: Mike Bayer Date: Fri, 2 Jul 2010 18:16:08 +0000 (-0400) Subject: - verbiage expressing that pool_size==0 means no limit; NullPool is X-Git-Tag: rel_0_6_2~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=786b35aaba530f61c289ab866a5454333a3450bd;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - verbiage expressing that pool_size==0 means no limit; NullPool is used to disable pooling. [ticket:1164] --- diff --git a/lib/sqlalchemy/engine/__init__.py b/lib/sqlalchemy/engine/__init__.py index 18b25fbaa3..b4894250f5 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 a802668a11..b0d6e0b01a 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