Hi Thomas, > Currently the database file only shrinks when closing the database > (shrinks for up to 2 seconds by default, and fully shrinks when > running "shutdown compact"). However empty space is automatically > re-used even without closing the database (that's different from > versions 1.1.x).
Good news. Excellent! We're finally upgrading to 1.2.135 from 1.0.71 ! This may help our use case - see below. > It's possible to implement "shrink while running", however so far I > didn't consider this very urgent. There is already a feature request: > "Automatically compact databases from time to time (as a background > process)." > This sound like the feature we're looking for. > > I will add a new request: "Compact databases without having to close > the database (vacuum)." (more urgent). If you're talking about making a specific call to compact, then I don't think we're looking for that. We could implement a periodic call to do this if you didn't have the auto-compact. > > Could you explain what is your use case? Our use case involves running an H2 server (server mode) which presently grows to over 20G. Hourly, we run a query to delete entries in the tables which are older than 14 days. Since space associated with those deletes is (presumably) empty. Now that we've upgraded from 1.0.71, that empty space will be reused. We'd like to have free space scrubbed (auto-compact) so that ops doesn't have to shut down the server to "compact" the db: less maintenance - maybe even zero maintenence, if the auto-compact does a good enough job. This is probably not that urgent - I'm hoping that the upgrade will do a lot to help us with the space issue, since we were using a version that didn't automatically reuse empty space. I'll keep an ear open for any announcements about compacting and probably upgrade again when that happens. Thanks! Glenn -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.
