Deleting data may not free enough space in the database file to allow
new records to be added [the new records may contain more data].  You
could continually delete old records until an INSERT succeeded
(indicating enough space now)?  Otherwise, I'd say you'll just have to
monitor the hard disk space and ensure you have enough free.  Even if
you detect the disk becoming full, you then have to decide on what to
do: delete old records, or raise some kind of alert to the user?

Don't forget you can always VACUUM the database (providing there's
sufficient disk space for SqLite to rewrite the vacuumed DB file out).
If you do that regularly, as well as deleting unwanted records, you
shouldn't run out of disk space.  (Unless of course you really DO need
all the data - in which case your disk needs to be bigger!)

Thanks,
Nick.


-----Original Message-----
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Antti Nietosvaara
Sent: 25 November 2009 09:41
To: sqlite-users@sqlite.org
Subject: [sqlite] Running out of space

Hello,

I have an application which keeps an index of data in an SQLite 
database.  I'm trying to figure out the best way to handle the possible 
scenario of database filling out the entire hard disk.  I could just 
delete some of the oldest rows, but I wonder if it's possible that even 
delete statements fail due to insufficient disk space for journal file.

Is there a robust way to handle these situations?


Thanks
- Antti
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to