I have a similar problem with a legacy data import library that should commit
every N rows batch inserts and also at the end of every table import.
Before importing data I drop all the objects. However the db size increase
at every import within the same jvm instance. At shutdown, it seems like h2
tries to remove (session-related) uncommitted data... at least I see long
calls /LobStorage.removeAllForTable()/ and /LobStorage.removeLob()/. Then
the DB size decreases. Please note I'm using the /LOCK=1/ parameter into the
JDBC URL (for performance reasons).

*So is there any way to query the database and get the list of pending
transactions?* I've seen there is a /INFORMATION_SCHEMA.IN_DOUBT/ table with
columns /TRANSACTION/, /STATE/: could they be used to detect pending
transactions? I've not found yet a way to disable auto commit from h2
console, so I have no easy way to see if that table is populated with
running transaction, at least until I don't write a small standalone test
case.


Noel Grandin wrote
> This is pretty much guaranteed to be because of open transactions.
> Unfortunately there is no easy way of finding them, short of monitoring 
> your own code to check that it is either using AutoCommit or calling 
> commit()/rollback() timeously.
> 
> On 2013-07-08 07:31, 

> chandran.lekha@

>  wrote:
>>
>> I have an H2 db named |temp.h2.db| which is accessed by two 
>> applications. The first one accesses it through embedded mode and the 
>> second one through server mode. Through the second application I load 
>> data into the database. But even when I drop the previous values and 
>> load the same data repeatedly, the db size increases. From about 
>> 200mb, it increased to about 2Gb. This happens even when I drop all 
>> tables and load a fresh set of data (which is almost of the same size 
>> as the previous set of data). Is this a bug?
>>
>>
> 
> -- 
> You received this message because you are subscribed to the Google Groups
> "H2 Database" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to 

> h2-database+unsubscribe@

> .
> To post to this group, send email to 

> h2-database@

> .
> Visit this group at http://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/groups/opt_out.





--
View this message in context: 
http://h2-database.66688.n3.nabble.com/h2-Continuous-Increase-in-H2-db-size-after-dropping-and-loading-same-data-repeatedly-tp4026836p4027072.html
Sent from the H2 Database mailing list archive at Nabble.com.

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to