Issue Details (XML | Word | Printable)

Key: CORE-1538
Type: New Feature New Feature
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Vlad Khorsun
Reporter: sboyd
Votes: 1
Watchers: 4
Operations

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

Add an option to isc_database_info to return the number of free pages in a database

Created: 25/Oct/07 02:42 PM   Updated: 02/Jan/16 11:32 AM
Component/s: API / Client Library
Affects Version/s: None
Fix Version/s: 3.0 RC2

Issue Links:
Relate
 


 Description  « Hide
I have already posted this request to the architect's list, but at Vlad's request I am also posting it here.

There are times when it would be nice to know how many free pages are available in a database. Consider the situation where an application stores large amounts of data in BLOBs. In this type of application it is important to constantly monitor the amount of disc space being used by the database so that the application doesn't consume all available space on the device. In a new database, when the application is constantly adding BLOBs, this is easily accomplished by monitoring the amount of free space on the device. When the free space drops below a certain threshold, the database can be purged and life carries on. But after the database has been purged, the free space on the device is not longer indicative of the free space available to the application since there exists a pool of unused pages inside the database itself. For this reason it would be nice to be able to know how many free pages there are in the database to know how much space is available to the application.

I was thinking that a new option on the isc_database_info API call could return the number of free pages.

I have sample code that implements this in a stand alone application if anyone want to see it.



 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Vlad Khorsun added a comment - 02/Jan/16 11:30 AM
Two new tags for isc_database_info was added:

fb_info_pages_used = 124
fb_info_pages_free = 125

PS Sorry it was took so long to implement this feature