03.01.2012 23:49, Kjell Rilbe wrote: > As far as I understand, with very limited knowledge about the ods, each > version of each record contains the id of the transaction that created > that record version. So, if transaction with id 5 created the record > version it will say "5" in there, always, as long as that record version > is still in existence. > > Now, old record versions get garbage collected. If the record version is > not the current one and its id is lower than the OIT, the disk space for > that record version is marked as free. > > But this happens ONLY for transaction version that are not "current". > Consider a lookup table that's created when the database is created. > Those records will possibly never change. Same goes for log records. So, > that old "5" will stay there forever, regardless of the OIT.
Theoretically, it could be worked around. A regular or manually started "something-like-a-sweep-but-different" activity could visit all the committed record versions and reset their txn IDs to e.g. OIT-1, thus making the ID space denser and causing a wrap around to be more-or-less safe. But it's going to be terribly slow (almost all data pages have to be modified). Also, with the wrapping allowed, the whole logic that handles txn IDs would turn to be much more complicated (simple checks like MAX(ID1, ID2) won't work anymore). In the past, I liked the idea to wrap the txn IDs, but now I'm more and more keen to consider other solutions instead. Dmitry ------------------------------------------------------------------------------ Write once. Port to many. Get the SDK and tools to simplify cross-platform app development. Create new or port existing apps to sell to consumers worldwide. Explore the Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join http://p.sf.net/sfu/intel-appdev Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel