On Fri, Jun 24, 2011 at 7:04 PM, Michael Bayer <mike...@zzzcomputing.com> wrote:
...
>> Is there a way to do it with the existing pools ?   If not, I guess
>> I'll work on a custom Pool,
>
> well a pool is geared towards one specific connection which already has a 
> "database" set up on it.    I guess maybe you'd use pool events to switch the 
> "database" on checkout.

do you known if the switching can be done without closing the socket ?

>
> You can share a pool between engines using the "pool" argument to 
> create_engine(), but one problem with that right now is that the dialect 
> which is per-engine uses the "on first checkout" event to handle some 
> important dialect initialization.  That step would have to be accommodated in 
> some way.
>
> Also this solution is only local to one Python process, not even a fork.  You 
> might have a simpler time limiting TCP connections using a product like 
> PGBouncer, and turn pooling way down or off for each SQLAlchemy pool, that 
> way you can truly limit connections per host.

Ok thanks for the tip I'll investigate on this

Cheers
Tarek

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to