Page 1 of 1

BeginReq and ReadCommitted

Posted: 10.07.2008, 14:44
by martinrame
Hi, I connect my application to a PostgreSql 8.3 server with BeginReq=True (default) and TransactionIsolationLevel=tiReadCommitted. Everything works ok but when I check the server status using pgAdmin, my connection is in <Idle in transaction> state, that's because the method TZPostgreSQLConnection.StartTransactionSupport issues a "begin" after connecting. Is it really required?.

If I set BeginReq=False, the status becomes <Idle>, but the database commits every insert/update/delete, when it shouldn't because I've set a StartTransaction before that.

Can you help with this?

Posted: 10.07.2008, 22:07
by mdaems
That's the way zeoslib is designed right now. Probably because it's difficult to make sure the "begin" is issued before the first real "transactional" action is fired.

If somebody wants to think/code about it : just go on. It will not be a feature for the 6.6 release, however. Also, this change is not only postgres related. It must behave the same way over all drivers.

Mark