On Wed, Jan 15, 2014 at 4:42 PM, <rmcgi...@oceris.com> wrote:

>
>
> Ok, running the gfix -sweep with everyone logged out did work and only
> took about 5 minutes.  I believe the issue came from me only trying to run
> the sweep one time and a transaction being stuck.  I never tried to run
> sweep AFTER restarting the services.  I also think there was confusion
> because I was under the incorrect assumption that gbak was doing a sweep
> while backing up.
>
Gbak (without the -g switch) will remove old record versions, but, like a
sweep, it only works up to the oldest transaction that was active when the
oldest transaction currently open started.  So if you have a transaction
that's stuck, neither gbak nor sweep will remove versions newer than some
version older than the stuck transaction.

The difference between sweep and a gbak backup without the -g  is that
sweep resets the value of the Oldest Interesting Transaction (OIT), and
gbak does not.  After a sweep, all record versions older than the sweep
threshold are guaranteed to be committed.  That used to be important
because InterBase had to carry around a bit vector the length of the
difference between the OIT and the current transaction - which could be a
lot of bits on a machine with a mid-1980's sized memory.  Each bit in the
vector represents the state of a transaction - committed or not.  The
vector still exists, but it takes a whole lot of bits to use any
significant fraction of the memory of a modern computer.

Good luck,

Ann

Reply via email to