Subject Re: [firebird-support] garbage collection points
Author Vlad Khorsun
> I studied good article about FB on this thema
> (http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_expert4#Note1b,
> http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_oit and from
> articles on IBSurgeon pages), but I have still some small questions
> about. I will be glad of anybody's help.
>
> 1. From header page info:
> Oldest transaction - known as Oldest Interesting Transaction (first
> transaction in other state then commited)
> Oldest active - Oldest transaction currently active
> Oldest snapshot - known as Oldest Active Transaction (transaction
> what was active when current Oldest active transaction was run)
> Am I understand header page info correctly ?

Yes

> 2. If an transaction is rollbacked, it will be changed to commit state
> later by sweep process. Before it happen, do other transaction suppose
> to clean its' garbage (garbage of rollbacked transaction) ?
> I suppose cooperation mode in garbage collection.

Yes. But only sweep will change transaction's state and only after succefull
run. Actually, sweep not changed every rolled back (dead) transaction state in TIP,
it just advanced OIT value on header page. This is a difference between background
garbage collector and sweep.

> 3. Is garbage collection process (again suppose cooperation mode) on
> record trigered only by SELECT statement or it could be trigered aswell
> by UPDATE or DELETE statements ?

UPDATE and DELETE also must read record, so answer is - yes

> 4. OIT and OAT transaction numbers on header page are updated only just
> in time when transaction start and will find out, that OIT and OAT are
> not actual ? So this transaction pickup new values into her local
> variables and will try to actualize header page ?

Yes.

Regards,
Vlad