Subject Re: [firebird-support] garbage collect
Author Nick Upson
great thanks

to make sure I've got this right

starting with the same database I can do either

a) gbak with gc

b) gbak without gc and gfix -sweep

and I will have the same final result

Extending this further, how can identify which tables contain (or did contain) the garbage. 

As well as handling it better I'm trying to see if we can cause less of it

Nick Upson, Telensa Ltd, Senior Operations Network Engineer
direct +44 (0) 1799 533252, support hotline +44 (0) 1799 399200

On 5 April 2015 at 18:07, Ann Harrison aharrison@... [firebird-support] <> wrote:

On Apr 5, 2015, at 11:23 AM, Nick Upson nu@... [firebird-support] <> wrote:

is there any effective difference between doing "gbak with gc" and 
"gbak without gc" and then "gfix -sweep"

The only differences (that I can think of) are caused by concurrent actions. If you garbage collect during backup, the sweep can remove new garbage created while the backup ran. 

Imagine that garbage collection takes enough time for fine thousand transactions to complete and each of those transactions makes three record versions obsolete. Neither gbak nor sweep can remove record versions made obsolete by the completion of a concurrent transaction. 

So if you backup without garbage collection, your backup is quicker, sweep starts sooner and takes longer so those 15,000 old record versions continue moldering in your database. 

If you backup with garbage collection and then sweep, the backup is slower, but the sweep starts later and can remove those unlovable record versions.  Sort of a wash, rinse, repeat thing - if that phrase means anything to those who aren't elderly 


From sunny Sint Maarten.