Hi Thomas, thanks for pointing me to the "auto commit" checkbox in the toolbar... I completely missed it.
I actually don't use LOBs (could they be internally used by H2 in order to save the transaction log?) In order to produce a reproducible test case I have to figure out how: I'll give it a look in the weekend. The relevant code is legacy and I had clearly evidence of the problem only after changing the LOG parameter from 0 to 1. But in the meantime we also developed an alternative H2 driver (actually a jdbc driver that wraps the original one) that simply deletes all the db files at first access, only if the database is corrupted (it is acceptable in my usage scenario). BTW I think having a way to access the list of pending transactions would be a valuable enhancement (it could be something like a readonly view with a minimal subset of postgresql's pg_stat_activity <http://www.postgresql.org/docs/9.2/static/monitoring-stats.html#PG-STAT-ACTIVITY-VIEW> contents). Cheers Davide Thomas Mueller-6 wrote > Hi, > > Could you provide a simple, reproducible test case? > > Do you actually use LOBs? > > INFORMATION_SCHEMA.IN_DOUBT is for in-doubt transactions when using > 2-phase > commit (prepared, but not committed). > > There is currently no way to measure how large a pending transaction is; > this is hard to implement right now, but should be quite simple with the > MVStore. > >> I've not found yet a way to disable auto commit from h2 console > > There is a "auto commit" checkbox in the toolbar. > > Regards, > Thomas > > > > On Wednesday, August 7, 2013, davide.cavestro wrote: > >> 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 > 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. >> >> >> > > -- > 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-tp4026836p4027092.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.
