Modified pool.lisp:acquire-from-conn-pool to perform connection
authorNathan Bird <nathan@acceleration.net>
Mon, 5 Jan 2009 19:18:42 +0000 (14:18 -0500)
committerNathan Bird <nathan@acceleration.net>
Tue, 2 Mar 2010 23:15:58 +0000 (18:15 -0500)
validity checks on all returned connections. Pooled connections can
become invalid whenever the pipe goes down, (such as db reboot).

Where possible use a reset command against the DB, otherwise we
do a simple 'SELECT 1;' on the connection and catch any errors
that occur, disconnecting the connection if it is no longer valid.

Several databases have reset commands that also reset connection
variables back to their database defaults leading to more consistent
behavior from a new connection.
 * mssql - sp_reset_connection
 * postgres - "RESET ALL"

Also introduced clsql-sys:*db-pool-max-free-connections* which
is a heuristic threshold for when to disconnect a connection
rather than returning it to the pool.


No differences found