BeginReq and ReadCommitted

Forum related to PostgreSQL

Moderators: gto, cipto_kh, EgonHugeist, olehs

Junior Boarder
Junior Boarder
Posts: 25
Joined: 24.10.2006, 18:29
Location: Córdoba, Argentina

BeginReq and ReadCommitted

Postby martinrame » 10.07.2008, 14:44

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?

User avatar
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium

Postby mdaems » 10.07.2008, 22:07

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.


Return to “PostgreSQL”

Who is online

Users browsing this forum: No registered users and 1 guest