Hi!

In distributed systems there is a problem to use Firebird and maintains
read consistency.

Imagine follow situations:

1) A server (not database server) receives a request and dispatch it to
others servers for extra processing and more than one server need to
access the same database in a consistent way.

2) A multi-threaded program (may be a future version of gbak) wants to
dispatch simultaneous queries to Firebird, so need to use more than one
attachment and transaction and then do not have transaction consistency.

I propose a clause to SET TRANSACTION (and its TPB) so user can inform a
"base transaction number" (better words and syntax are welcome).

SET TRANSACTION ISOLATION LEVEL SNAPSHOT FROM BASE 100

In this case, 100 must be an active transaction and the snapshot of the
new transaction will be the same snapshot used when transaction 100 was
started.

New transaction will not get uncommitted changes of transaction 100.

With this, a program (or a set of coordinated programs) may use same
Firebird database in multi-threaded / multi-process way preserving read
transaction consistency.

New semantics may also be introduced to use non-active transaction as
base number and a policy to retain some garbage for a period so one can
do time-lapsed queries. This is, however, out of the scope of this proposal.


Adriano


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to