Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an option to isc_database_info to return the number of free pages in a database [CORE1538] #1955

Closed
firebird-automations opened this issue Oct 25, 2007 · 11 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: sboyd (sboyd)

Relate to CORE5063

Votes: 1

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.

Commits: 9165f8b FirebirdSQL/fbt-repository@8d121ec

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

assignee: Vlad Khorsun [ hvlad ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

Fix Version: 3.0.0 [ 10048 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Workflow: jira [ 13346 ] => Firebird [ 14014 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Fix Version: 3.0 Alpha 1 [ 10331 ]

Fix Version: 3.0.0 [ 10048 ] =>

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Fix Version: 3.0 Beta 1 [ 10332 ]

Fix Version: 3.0 Alpha 1 [ 10331 ] =>

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Fix Version: 3.0 Beta 2 [ 10586 ]

Fix Version: 3.0 Beta 1 [ 10332 ] =>

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Fix Version: 3.0 RC 1 [ 10584 ]

Fix Version: 3.0 Beta 2 [ 10586 ] =>

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Fix Version: 3.0.0 [ 10048 ]

Fix Version: 3.0 RC 1 [ 10584 ] =>

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

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

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

Link: This issue relate to CORE5063 [ CORE5063 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants