Hello list,

we use SQLite on an embedded device and have the requirement to limit the 
maximum size the database file(s) use on the storage device. Using PRAGMA 
MAX_PAGE_COUNT=x works fine to limit the size of the actual database file, but 
does not consider the size of the journal and temporary files.

For our use case we have to execute INSERT, UPDATE and DELETE statements inside 
a transaction and have to execute a ROLLBACK as soon as a size limit of the 
database file(s) is reached.

It is not possible to use quota mechanisms of the file system or for example to 
create a partition with a maximum size. The size limitation is a soft-limit 
which has to be enforced by the database or our application.

Is there a way to limit the size of the journal and temporary files created and 
filled by SQLite? Or is it possibly to find out the current file size of the 
journal and tempoarary files using some API.

Or is there a way to calculate the size of the journal and temporary files in 
advance if the current data of the database and the data to be 
inserted/changed/deleted is known?

Thank you for your help.

Best regards
Tobias

--
Tobias Müller
PTV AG
Mobile Solutions
E-Mail: [EMAIL PROTECTED]
____________________________
PTV
Planung Transport Verkehr AG
Stumpfstraße 1
76131 Karlsruhe
Germany
http://www.ptv.de
____________________________
PTV Planung Transport Verkehr AG
Hauptsitz / Headquarters: Karlsruhe
Vorstand / Board of Directors: Dr.-Ing. Hans Hubschneider, Dr.-Ing. Thomas 
Schwerdtfeger, Dr. Joachim Schmidt, Harald Holberg, Thomas Haupt, Vincent 
Kobesen
Vorsitzender des Aufsichtsrates / Chairman of the Supervisory Board: Dr. 
Volkmar Mair
Handelsregister / Companies' Register (HRB-Nr): 109262
Amtsgericht / District Court: Mannheim
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to