Subject Re: [firebird-support] GCPolicy and FB 2.0
Author Ann W. Harrison
Guido Klapperich wrote:
> In FB 2.0 the new configuration parameter GCPolicy was introduced. One
> possible value is 'combined', which means according to the release
> notes, that both background and cooperative GC are performed. But the
> release notes don't tell me, when the background and when the
> cooperative GC is performed. Can someone help me clarifying these things?
>

In Firebird 1.5 all garbage collection is done by a background
thread. When a transaction notices an unnecessary back version
or rolled-back record, it puts that record version on a list for
the garbage collect thread to remove when it gets around to it.
In a loaded system, that can take a while, so the record may be
flushed out of cache before the GC thread gets to it. Rereading
records is expensive.


In the combined mode of Firebird 2, the thread that discovers
the problem will do the garbage collection if it can do so without
reading any more pages. Hard garbage collection is deferred to
the garbage collect thread.


Regards,


Ann