title: reason for sqlalchemy to roll back
body: <p>I am using sqlalchemy to store data into a postgresql database. I am a little bit confused that sqlalchemy rolls back on execution without throwing an exception. I found an <a href="http://docs.sqlalchemy.org/en/rel_0_9/faq.html#why-does-sqlalchemy-issue-so-many-rollbacks" rel="nofollow">article in the documentary</a> and tried to prevent rollbacks by setting <code>pool_reset_on_return='commit'</code></p>
  
  <p>This actually leads sqlalchemy to do nothing. Hence, I inserted a line that explicitly calls <code>trans.commit()</code> that leads to the following output:</p>
  
  <pre><code>2014-03-03 18:03:33,390,p:32764 Thread-3, sqlalchemy.engine.base.Engine(_execute_context) [INFO]: INSERT INTO _fd (**)
  2014-03-03 18:03:33,391,p:32764 Thread-3, sqlalchemy.engine.base.Engine(_execute_context) [INFO]: {****}
  2014-03-03 18:03:33,392,p:32764 Thread-3, sqlalchemy.engine.base.Engine(__init__) [DEBUG]: Col ('fid',)
  2014-03-03 18:03:33,393,p:32764 Thread-3, sqlalchemy.engine.base.Engine(process_rows) [DEBUG]: Row (*,)
  2014-03-03 18:03:33,393,p:32764 Thread-3, sqlalchemy.engine.base.Engine(_rollback_impl) [INFO]: ROLLBACK
  </code></pre>
  
  <p>The code is quit simple so far:</p>
  
  <pre><code>1837     with conn.begin() as trans:                                                                                                                                                                                                           
  1838         statement = meta.tables[_table_name].insert().values(
  ...
  1847         )
  1848         res = conn.execute(statement)
  1849         trans.commit()
  </code></pre>
  
  <p>Does anyone have an idea, what could be the cause for the rollbacks?</p>