In my application, I connect to an H2 database, and I recently studied how this database ends up.
In my connection string, I set DEFRAG_ALWAYS=true , which according to H2 doc
Each time the database is closed, it is completely defragmented (SHUTDOWN DEFRAG).
Now I assume that when the JVM shuts down, the completion hook will stop the database and defragment it (as if SHUTDOWN DEFRAG ).
But if I had to do SHUTDOWN COMPACT before exiting the application, while DEFRAG_ALWAYS=true was applied in the connection string, what shutdown process would be used?
source share