Hi!
Please send me an example (pseudo-code) for Serializable conflict.
And I wanna know, if possible, that if more transactions only read the
tables in Serializable mode, and one or others write to it, can I got some
conflicts in read operation?

c = client t = transaction

c1t1 begin serial
c1t1 select sum(netto) from order_items where order_code = 1

c2t2 begin
c2t2 insert into order_items ....

c3t3 begin serial
c3t3 select sum(netto) from order_items where order_code = 2

c2t2 commit

c4t4 begin serial
c4t4 select sum(netto) from order_items where order_code = 1

c1t1 select count(order_items)

c4t4 rollback

c1t1 rollback

c3t3 rollback

I wanna understand, which limitations I need to see in my code to avoid
conflicts on "important queries" where my calculated items must be equal
(like count(*) = len(fetched(*)).

Sorry for the rtfm like question, but is rather DSFE like (Do and See the
F*ed Experience). So your experience needed.

Thanks for your help:
dd

Reply via email to