db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kristian Waagan <Kristian.Waa...@Sun.COM>
Subject Re: Question about logs directory & reclaiming disk space.
Date Fri, 26 Feb 2010 21:47:55 GMT
On 26.02.2010 20:41, PretzelLogic wrote:
> Hello,
>
> I'm embedding a derby db into a java app that is deployed to Tomcat 6.   I
> have a process that will delete records and I'm wanting to reclaim the disk
> space after the deletion .  My program is calling this fuction -->  CALL
> SYSCS_UTIL.SYSCS_COMPRESS_TABLE but I'm seeing the log directory has many
> log files that do not go away unless the tomcat container is restarted.  Is
> there a process that will also clean up those files?
>    

Hi,

What do you mean with many files?
It sounds like you may have some long running transactions in your 
system. Unless you have enabled log archive mode, log files no longer 
needed should be removed when a checkpoint is made.

You could try to invoke the checkpoint procedure (see 
SYSCS_UTIL.SYSCS_CHECKPOINT_DATABASE) manually, or you could check with 
the transaction table if there are active transactions (i.e. '.SELECT * 
FROM SYSCS_DIAG.TRANSACTION_TABLE' to obtain snapshot of it). 
Checkpoints should be made automatically (triggered by log volume I 
think, see manuals for details).

If you do a clean shutdown (connect to the database with 
"shutdown=true") a checkpoint should be made. If you don't shut down 
cleanly Derby will do recovery on startup (the startup will take longer, 
how much depends on the amount of log to process).


Hope this helps,
-- 
Kristian


Mime
View raw message