Subject Re: [firebird-support] Re: Long Running Transactions...again...
Author Pavel Menshchikov
Hello Berenger,

b> I've done some tests to verify this and it's not what I saw !

b> The test I did was:
b> T1 ReadCommitted R/W
b> T2 Snapshot

b> T1 Open
b> T2 Open

b> Loop many many times:
b> Write something in T2 and commit
b> Write something in T1 and commitretaining from time to time.

b> Now, checking GSTAT, I see the oldest snapshot is stuck to where it
b> was when our transactions started.
Which is correct since your T1 is writing, and CommitRetaining is not
equal to Commit.

b> Which is not what Craig Stuntz said would happen: that it was OK to
b> keep a transaction open using ReadCommitted/CommitRetaining, but ONLY
b> in IB7.1 because of some new functionality.

b> Am I getting something wrong or do FB and IB7.1 behave differently in
b> this situation ? Or does the fact that "oldest snapshot" doesn't move
b> forward not mean anything is going wrong ?
In FB you should use ReadCommitted and Read(-only) parameters for T1,
and commit that transaction when you don't need its data any more
(usually you use such transactions to show some data in grids, etc.).
You call it long-lasting reading transaction. And to modify some data
you start short-lasting snapshot writing transaction.

Best regards,
Pavel Menshchikov