Subject Re: Transaction Info
Author kapsee
Thanks, Ann.

I also had a question about Transaction IDs, I haven't gotten a
definite response to this so far.

In version 1.5, are the transction IDs still 32 bits or do they go up
to 64 bits ? If they are 32 bits, what happens when they wrap ? Does
the garbage collection handle that ?

Thanks!

--- In firebird-support@yahoogroups.com, "Ann W. Harrison"
<aharrison@i...> wrote:
>
> kapsee wrote:
> >
> > 3. gstat gives information about the oldest transaction and oldest
> > active. What is the difference between the two ?
>
> The oldest transaction is the first transaction that did not commit - it
> could be rolled back, in limbo, or active. That marks the beginning of
> the "interesting" transactions - those which could require special
> handling. The database maintains an array in memory of the interesting
> transaction states - two bits per transaction. If the array is very
> large, you're wasting some memory.
>
> The way to move the oldest transaction is to sweep the database with
> gfix. It removes any records created by transactions that rolled back
> and marks the transactions as committed.
>
> The oldest active transaction is the oldest transaction that was
> running at the start of the oldest transaction currently running.
> Nothing created by a newer transaction can be garbage collected, so
> cruft builds up when the oldest active is much below the next
> transaction.
>
>
> > Is it possible to
> > obtain this information using any firebird API ?
> >
>
> Yes. Use the database info call.
>
> isc_info_oldest_transaction = 104,
> isc_info_oldest_active = 105,
> isc_info_oldest_snapshot = 106,
> isc_info_next_transaction = 107,
>
>
> Regards,
>
> Ann
>