Hello,
I feel a little confusing about the functionality of transaction isolation and locking.Hoping someone can help me.
Lets suppose 2 transactions work on the same record I call them T1,T2. T1 start transaction before T2. T2 commit before T1 here what I got:
Serializable, I got dead lock error on T1;
Repeatableread and Read Committed I got no error and the last commit effects the record.
Apart from the first case, isolation level does not manage the lock of the
record. So assume that isolation level does not manage locking. How can I menage locking on row level? Shold I use SELECT ... FOR UPDATE or
SELECT... or SELECT ...LOCK IN SHARE MODE?
Thanks
Marco
Zeos and locking
Moderators: gto, cipto_kh, EgonHugeist
Re: Zeos and locking
Maybe my post is not so clear... Someone can tell me how to menage row lock?marcocot wrote:Hello,
I feel a little confusing about the functionality of transaction isolation and locking.Hoping someone can help me.
Lets suppose 2 transactions work on the same record I call them T1,T2. T1 start transaction before T2. T2 commit before T1 here what I got:
Serializable, I got dead lock error on T1;
Repeatableread and Read Committed I got no error and the last commit effects the record.
Apart from the first case, isolation level does not manage the lock of the
record. So assume that isolation level does not manage locking. How can I menage locking on row level? Shold I use SELECT ... FOR UPDATE or
SELECT... or SELECT ...LOCK IN SHARE MODE?
Thanks
Marco