Subject | Re: Transaction Info |
---|---|
Author | Adam |
Post date | 2005-11-15T23:00:53Z |
> A few questions regarding transactions:With Firebird 1.5 or higher,
>
> 1. Is it possible to get the transaction number in a trigger ?
CURRENT_TRANSACTION
> 2. Are the transaction numbers assigned in an increasing sequence ?Yes and no. Yes they are assigned in increasing sequences, but they
>
reset to 0 if you restore, so if the next transaction is 100, and you
back it up and restore it, it goes back to 1.
> 3. gstat gives information about the oldest transaction and oldestI forget this myself. The difference between the two is bad if it is
> active. What is the difference between the two ? Is it possible to
> obtain this information using any firebird API ?
>
too large. Ideally, they should remain pretty close. If the gap is too
big, then old record versions will start clogging up the database with
garbage. The normal culprits are commit retaining and rollback
retaining, which do not release the context and so do not help the
garbage collection.
Some light reading ;)
http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_expert4
I don't know if it is possible through the API.
Adam