Subject Re: [firebird-support] Re: Oldest transaction far behind...
Author Norman Dunbar
Hi Kjell,

> "Snapshot - the ID of the oldest transaction which is currently not
> eligible to be garbage-collected. Any transaction with this or a higher
> ID cannot, yet, have old record versions removed by a sweep, for example."
>
> I interpreted this as saying that a sweep wouldn't help. Maybe I was
> wrong, but in that case I think this document is misleading.

You need to consider the difference between the Oldest Interesting
Transaction (OIT) and the Oldest Active Transaction (OAT). If the
difference between those two is greater than the sweep interval, the
sweep will automatically run and clear "garbage" from the database.

The oldest snapshot transaction (OST) is normally the same as the OAT
and indicated, basically, the transaction number beyond which a sweep
will not clear out "garbage".

In your gstat -h you have:

> Oldest transaction 25545713
> Oldest active 26347481
> Oldest snapshot 26347481

So, the sweep will clear out all the "garbage" from transaction 25545713
(OIT) right up to the transaction numbered 26347481 (OST and OAT).

So, effectively, and given that your next transaction is numbered
26347482, your sweep will clear everything right up to the most recent
transaction.


Cheers,
Norman.

PS. I wrote the gstat manual! Happy to make changes if you think the
wording is incorrect, but I think it actually makes sense, however I'm a
native English speaker while you may not be.

--
Norman Dunbar
Dunbar IT Consultants Ltd

Registered address:
Thorpe House
61 Richardshaw Lane
Pudsey
West Yorkshire
United Kingdom
LS28 7EL

Company Number: 05132767