On Wednesday 09 December 2009 23:10:05 mozillalives wrote: > Hi everyone, > I'm new to Elixir, but I've been using it for a couple of weeks now > and am blown away by its ease of use. Really awesome library. > > I'm having a little trouble running a custom query in my current setup > and I was wondering if I could get a hand. I connect to a postgres > database and, after inserting a few thousand rows, try to run 'VACUUM > FULL ANALYZE' using metadata.bind.execute. I get the following error > when I do. > > InternalError: (InternalError) VACUUM cannot run inside a transaction > block > > I'm guessing this is because the session is created with > autocommit=False, but I'm not clear how to set it to True (I'm also > new to SQLAlchemy). Can I alter the existing session to auto commit or > will I need to create a new session for this?
Yes, I think you should bypass Elixir for this & instead go for a separate session created with SQLAlchemy that is set up the way you need it. May I ask why you do this vacuum? AFAIK pg since 8.x does this stuff all by itself. Diez -- You received this message because you are subscribed to the Google Groups "SQLElixir" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sqlelixir?hl=en.
