if you close all connections (i.e. return them all to the pool), and then go to get them again, it can handle a restart *if* the dialect knows how to detect the conditions whereby it should invalidate() the connections. which is generally pretty spotty, i dont think PG knows how to do it. also i dont understand the error condition you are getting, the connections should all be getting returned above ( or some exception would be thrown).
are you stopping the DB while the first fetchall() is executing ? or in between ? On Jan 25, 3:54 pm, "Jonathan Ellis" <[EMAIL PROTECTED]> wrote: > from sqlalchemy import * > e = create_engine('postgres://...', pool_size=1, max_overflow=0, > pool_timeout=None) > e.execute('select 1').fetchall() > # restart db > e.execute('select 1').fetchall() > # error gets raised, ConnectionRecord apparently doesn't get returned > to pool because: > e.execute('select 1').fetchall() > # hangs, pool overflow=1 (so new CR is not created) but nothing is in the > queue --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---