Subject | Re: [firebird-support] Purpose of the OST (Oldest Snapshot Transaction) |
---|---|
Author | Ann W. Harrison |
Post date | 2011-02-09T20:35:57Z |
On 2/5/2011 8:42 AM, Michael Ludwig wrote:
by the database as a whole to determine the scope of garbage collection.
In order to maintain a stable view of the database for Snapshot
transactions, Firebird has to avoid garbage collecting records
that any running transaction might see. It does so by tracking
the oldest transaction that was running when any active transaction
started. Each transaction carries with it the identifier of the
oldest transaction that was running when it started. Firebird's
garbage collection ceiling is set to the oldest of those values
among running transactions. When the oldest running transaction
stops, Firebird resets the ceiling to the value from the oldest
of the remaining transactions.
If a record has two or more versions older than the ceiling value,
Firebird can garbage collect the older versions without affecting
the stability of any running transaction.
Does that make sense?
Cheers,
Ann
> Every transaction that is not READ ONLY READ COMMITTED is assignedThe value is not used by the transaction itself, but is used
> a value for the Oldest Snapshot field. I'd like to understand what
> this field is needed for.
>
by the database as a whole to determine the scope of garbage collection.
In order to maintain a stable view of the database for Snapshot
transactions, Firebird has to avoid garbage collecting records
that any running transaction might see. It does so by tracking
the oldest transaction that was running when any active transaction
started. Each transaction carries with it the identifier of the
oldest transaction that was running when it started. Firebird's
garbage collection ceiling is set to the oldest of those values
among running transactions. When the oldest running transaction
stops, Firebird resets the ceiling to the value from the oldest
of the remaining transactions.
If a record has two or more versions older than the ceiling value,
Firebird can garbage collect the older versions without affecting
the stability of any running transaction.
Does that make sense?
Cheers,
Ann