Re: [sqlalchemy] Mention special meaning of pool_size=0 and recommend NullPool in documentation of pool_size parameters.

2010-06-18 Thread Michael Bayer
sure that is fine thanks for the patch. On Jun 18, 2010, at 1:02 PM, John Keith Hohm wrote: > I reopened http://www.sqlalchemy.org/trac/ticket/1164, and added a > documentation-only patch, after spending some time trying to figure > out the same behavior as stumped the original submitter. I hop

[sqlalchemy] Mention special meaning of pool_size=0 and recommend NullPool in documentation of pool_size parameters.

2010-06-18 Thread John Keith Hohm
I reopened http://www.sqlalchemy.org/trac/ticket/1164, and added a documentation-only patch, after spending some time trying to figure out the same behavior as stumped the original submitter. I hope that's appropriate. -- You received this message because you are subscribed to the Google Groups

[sqlalchemy] Re: Troubleshooting 'too many clients already'

2010-06-18 Thread Gregg Lind
For completeness: the issue was I had a function that took a dburi, then created another engine, that was called repeatedly. Once I changed it to take an *engine*, the problem cleared up. (side tip: psql has a "show all" command that is useful for seeing the config info, on machines where one can

Re: [sqlalchemy] using queried objects across transaction boundaries without them requerying

2010-06-18 Thread xtian
Gah, that's totally obvious in retrospect. Thanks Michael. On Fri, Jun 18, 2010 at 4:33 PM, Michael Bayer wrote: > > On Jun 18, 2010, at 10:33 AM, xtian wrote: > >> Hi - >> >> We've been using sqlalchemy (0.5) at work for some new scripts, but >> I've run up against this problem a couple of times

Re: [sqlalchemy] using queried objects across transaction boundaries without them requerying

2010-06-18 Thread Michael Bayer
On Jun 18, 2010, at 10:33 AM, xtian wrote: > Hi - > > We've been using sqlalchemy (0.5) at work for some new scripts, but > I've run up against this problem a couple of times, and I'm wondering > if there's a way to structure my code differently to avoid it. > > We have some jobs which need to

Re: [sqlalchemy] Retrieving new instance by identity key?

2010-06-18 Thread Michael Bayer
On Jun 18, 2010, at 11:05 AM, Torsten Landschoff wrote: > Hi *, > > I wonder if it is possible and supported in SQLAlchemy to query an > instance by identity key. > > Use case: I want a length operation to run in an extra process. That > means I will need an extra database connection in that pr

Re: [sqlalchemy] Re: alchemy-migrate with DeclarativeBase

2010-06-18 Thread Torsten Landschoff
Hi Shane, On Thu, 2010-06-17 at 23:09 -0700, Shane wrote: > def upgrade(): > try: > session.begin() # Start transaction, but tables are always > committed > (See below) > > DeclarativeBase.metadata.tables[Account.__tablename__].create(migrate_engine) Hmm, that looks o

Re: [sqlalchemy] Retrieving new instance by identity key?

2010-06-18 Thread Torsten Landschoff
On Fri, 2010-06-18 at 17:05 +0200, Torsten Landschoff wrote: > Using that key, I can retrieve the instance again in the new process. > But where is the method that can do that? I was expecting something like > > session.get_instance_by_key(key) > > to be in the API, but I am unable to find it.

[sqlalchemy] using queried objects across transaction boundaries without them requerying

2010-06-18 Thread xtian
Hi - We've been using sqlalchemy (0.5) at work for some new scripts, but I've run up against this problem a couple of times, and I'm wondering if there's a way to structure my code differently to avoid it. We have some jobs which need to update various column values in the symbol table based on a

[sqlalchemy] Retrieving new instance by identity key?

2010-06-18 Thread Torsten Landschoff
Hi *, I wonder if it is possible and supported in SQLAlchemy to query an instance by identity key. Use case: I want a length operation to run in an extra process. That means I will need an extra database connection in that process and have to retrieve the objects I am working with again. To impl

Re: [sqlalchemy] sqlite transaction rollback after pk clash not working?

2010-06-18 Thread Michael Bayer
On Jun 18, 2010, at 7:46 AM, Harry Percival wrote: > Hi Michael, > > the get_table_as_columns_dict starts a new session and does a select all, > returning results as a dictionary of columns-lists. my reading of the debug > output though, is that this happens *after* a rollback which seems

Re: [sqlalchemy] sqlite transaction rollback after pk clash not working?

2010-06-18 Thread Harry Percival
Hi Michael, the get_table_as_columns_dict starts a new session and does a select all, returning results as a dictionary of columns-lists. my reading of the debug output though, is that this happens *after* a rollback which seems to be called automatically: debug output starts from the first at