BeginReq and ReadCommitted

Forum related to PostgreSQL

Moderators: gto, cipto_kh, EgonHugeist, olehs

Post Reply
martinrame
Junior Boarder
Junior Boarder
Posts: 25
Joined: 24.10.2006, 18:29
Location: Córdoba, Argentina
Contact:

BeginReq and ReadCommitted

Post 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?
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post 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
Image
Post Reply