Skip to content

gbak does not do sweep unless sweep threshold exceeded [CORE6190] #6435

@firebird-automations

Description

@firebird-automations

Submitted by: T J C (tjc)

I had understoon that a backup would reset the Oldest Interesting Transaction (OIT) as well as the Oldest Snapshot (OST) and had set the sweep interval to zero, and was doing nightly backups (see bottom for documentation issue)

I have since found that when the sweep interval is set to zero, no sweep is done during a gbak backup regardless of the -g parameter. I would expect the sweep functionality and setting the OIT would be done when garbage collection is done.

Of interest however, if the sweep interval is set below the (OST - OIT) immediately before the backup is done, then a gbak backup *DOES* do the sweep set the OIT value, so I assume the sweep is being done.

In my opinion, a gbak backup should be doing a sweep, regardless of the sweep interval, unless the -g option is specified.

Apologies if my lack of internals knowledge makes you think I have no idea what I am talking about... entirely possible :)

It seems to me that this is at the least this is a documentation issue See https://firebirdsql.org/manual/gfix-housekeeping.html
"Disabling Automatic Sweeping
If you set the sweep interval to zero then automatic sweeping will be disabled.
This implies that there will be no automatic housekeeping done so your database performance will not suffer as a result of the processing requirements of the automatic sweep.
If you disable sweeping you are advised to run a manual sweep at regular intervals when the database is quiet.
*Alternatively, simply make sure that you take regular backups of the database and as this is something you should be doing anyway, it shouldn't be a problem.*"

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions