Subject Re: [firebird-support] Sweep and general maintenance (newbie question)
Author Helen Borrie
At 10:52 AM 27/04/2004 +0200, you wrote:

> >
> > That's part of the story. The other part is that sweeping is the only way
> > (apart from an actual restore) that will free space that was occupied by
> > deleted rows.
>
>Perhaps I am mistaken, but shouldn't the garbage collector thread
>do just that? And if not, what does that one do?
>
>Oh darn, do I still don't get it?

The GC thread gets rid of old record versions (from deletes and updates)
that belonged to transactions that have the status "committed". But it
doesn't release space from deletes: that just sits there as a stump until
sweep comes along and releases it. Updates don't have "stumps" because the
newest version overwrites the older version.

Another thing sweep does that GC can't do is fix up the flotsam and jetsam
from transactions that never completed because of an abnormal
disconnection; and deals with rolled back transactions, i.e. changes them
to "committed", ultimately, and either garbage-collects the associated
unwanted recversions itself, or leaves them for the next GC to pick up.

Helen