We’re using H2 database (persistent) embedded within our application.
Even after we delete the tables, the h2.db file keeps growing.
We tried disabling transaction isolation (LOCK_MODE=0), disabled the query log (TRACE_LEVE_FILE=0), disabled the undo log, but nothing helps.
Is compacting the only option? Compacting will need restart of the DB which we cannot do.
This issue got resolved. The issue was we were using connection stored in the servlet context. This connection was never closed. We changed the code to manage connections ourselves and close connections after tables are dropped (and reopen).