stmt.addBatch( "set EXCLUSIVE 1" );
stmt.addBatch( "set retention_time 0" );
stmt.addBatch( "checkpoint" );
stmt.addBatch( "checkpoint" );
stmt.addBatch( "checkpoint" );
stmt.addBatch( "checkpoint" );
stmt.addBatch( "checkpoint" );
stmt.addBatch( "checkpoint" );
stmt.addBatch( "set retention_time 45000" );
stmt.addBatch( "set EXCLUSIVE 0" );
stmt.executeBatch();
conn.commit();
--
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...@googlegroups.com.
To post to this group, send email to h2-da...@googlegroups.com.
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to h2-database+unsubscribe@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to h2-database...@googlegroups.com.
stmt.execute( "CREATE TABLE IF NOT EXISTS CDS_FWD_DATA("
+ "FILENAME VARCHAR(255) NOT NULL, "
+ "DATE TIMESTAMP DEFAULT CURRENT_TIMESTAMP, "
+ "ACQUIRE_TYPE VARCHAR(30) NOT NULL, "
+ "PUBLISH_COUNT INT, "
+ "DATA CLOB, "
+ "PRIMARY KEY ( FILENAME, DATE) )" );
stmt.addBatch( "set EXCLUSIVE 1" );
stmt.addBatch( "set retention_time 0" );
stmt.addBatch( "checkpoint" );
stmt.addBatch( "checkpoint" );
stmt.addBatch( "checkpoint" );
stmt.addBatch( "checkpoint" );
stmt.addBatch( "checkpoint" );
stmt.addBatch( "checkpoint" );
stmt.addBatch( "set retention_time 45000" );
stmt.addBatch( "set EXCLUSIVE 0" );
stmt.executeBatch();
conn.commit();
I will keep testing of course, but my earlier issue seems to be limited to the CLOB datatype.
--
You received this message because you are subscribed to a topic in the Google Groups "H2 Database" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/h2-database/-gX356p5w3U/unsubscribe.
To unsubscribe from this group and all its topics, send an email to h2-database...@googlegroups.com.
To unsubscribe from this group and all its topics, send an email to h2-database+unsubscribe@googlegroups.com.
This topic is very interesting. I agree with Kenton: also in my case is not simple to understand when the problem happens. Sometimes all go fine, sometimes not.
The thing on which all we agree, I think, is that at some points remains orphaned Lob Blocks and they should be erased by h2.
Thanks
To unsubscribe from this group and all its topics, send an email to h2-database...@googlegroups.com.
Hi Thomas, do you mean that the problem happears only when "shutdown immediatly" is enabled?
Thanks
For instance, I can let my database go idle for a day+ and the LOB_BLOCKS will remain in the database file when the tables are otherwise empty.
--
--
Hi,Could you please post a simple reproducible test case? I did test this and didn't find a problem with the latest version.Regards,Thomas
Hi Thomas,--I have a table with blob data. Each time I open a new connection, write blob data and then delete it, then close the connection. I tried both 1.4.185 and latest 1.4.190. I still saw the database size is growing. When I open the database with H2 console, I did not see table LOB_BLOCKS. But when I used Recover to recover the database, I saw a huge number of inserts to LOB_BLOCKS. Does those "invisible" data in LOB_BLOCKS cause the database growing? How could we solve it? Thank you for your help./Zhencai
On Thursday, February 19, 2015 at 10:44:12 PM UTC-8, Thomas Mueller wrote:Hi,If you have entries in LOB_BLOCKS, then it is either a CLOB or a BLOB value. Such values can also occur for example when using PreparedStatement.setCharacterStream; it doesn't necessarily mean the table has a CLOB / BLOB column.When using the MVStore, with the current released version, some of the temporary LOB_BLOCKS are never cleaned up. The fix I made now cleans them up when stopping and starting the database (unless they are removed earlier). To find out if this solves the problem for you, you can try it out with the latest trunk (you would need to build H2 yourself).> As far as not "re-used as quickly", do you have any way to quantify that?Yes. With the MVStore, by default, space is re-used after 45 seconds (actually a bit longer than that, as the live entries first have to be copied somewhere else). This is the default retention time (see "set retention_time" in the docs).For instance, I can let my database go idle for a day+ and the LOB_BLOCKS will remain in the database file when the tables are otherwise empty.Is it possible for you (in theory) to close and re-open the database from time to time?Regards,Thomas
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@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to h2-database...@googlegroups.com.
To post to this group, send email to h2-da...@googlegroups.com.
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.
--
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...@googlegroups.com.