Issue Details (XML | Word | Printable)

Key: CORE-2226
Type: New Feature New Feature
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Miha Vrhovnik
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Firebird Core

shrink db via api

Created: 03/Dec/08 12:34 PM   Updated: 26/Oct/09 03:39 PM
Component/s: None
Affects Version/s: 2.5 Beta 1
Fix Version/s: None


 Description  « Hide
AFAIK the only way to remove unused pages from DB is using backup/restore functionally using external executable. This is really bad for embedded version. I think that for embedded version there should be API which would compact/reorder data in database and remove unused pages so DB file after that would be smaller.

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Dmitry Yemanov added a comment - 03/Dec/08 02:10 PM
Backup/restore can be performed using the Services API as well.

Staffan Bergbom added a comment - 30/Mar/09 04:45 AM
I really agree that this is a MUST.
For quite a few years we(Metria, Land Survey of Sweden) have been using FireBird for customers
in Health Care and have constantly had problems with growing database. The service we provide
must be up 24 hours a day and data is inserted, updated and deleted all the time. We are forced
to shut the service down to be able to make a db-shrink. A decision is threrfore taken th switch to
PostgreSQL that doesn't have this problem. A comparison on the net between FirBird and PostgreSQL
mentioned exactly a constantly growing db as the major drawback for FireBird.

Would be glad to hear from you about your plans to fix this

Kindly
Staffan Bergbom

Dmitry Yemanov added a comment - 30/Mar/09 08:17 AM
If your database is growing in the described conditions, then I'm afraid something is wrong with transaction management in your system. Firebird itself doesn't have such a problem, it just requires some discipline from client applications, i.e. not keeping snapshot transactions active for a long time and caring about the sweep.

Karol Bieniaszewski added a comment - 26/Oct/09 03:39 PM
I suppose that you use some bad driver or like Dimitry say your transaction management is bad
If you use e.g. dbExpress driver for Interbase with Firebird it start some internal transaction
and never end it. This stop garbage collector and your database grow and grow - also speed is degraded becaouse of record versions

you can check long running transactions in FB2 using monitoring tables