On 04/11/2013 04:27 PM, Kejia柯嘉 wrote:
hi all,
if i use `virtual-connection' from a `connection-pool' to get a
connection, is the connection disconnected or released back to the pool
when the thread involved finishes?
It's usually released back to the pool. There are some situations that
cause it to be disconnected instead, such as if the connection is in a
transaction when the thread finishes (if I recall correctly).
p.s.: when i use `connection-pool', why is there no change of the number
of active connections in psql (select * from pg_stat_activity;)?
The pool creates a few connections and reuses them, so the number of
active connections should not change (or rather, it should change slowly).
Ryan
____________________
Racket Users list:
http://lists.racket-lang.org/users