Graham Holden wrote:
-------- Original message --------
From: Dan Kennedy <danielk1...@gmail.com>
Date: 26/05/2016 18:04 (GMT+00:00)
To: sqlite-users@mailinglists.sqlite.org
Subject: Re: [sqlite] Sync journal's directory per transaction? or until
database closed? in PERSIST mode
On UNIX, it's possible to delete a file from the file-system while
another process has it open. In this case the other process can continue
reading and writing its file-descriptor as normal, but the data is
stored in memory only, not on disk (since the directory entry has been
deleted). Once the process exits or closes the file-descriptor, the data
is lost.
It probably doesn't affect the argument of why SQLite does what it does,
but I thought (but it's been a long time since I poked around UNIX
file-systems) that data can still be written (or read) to disk because the
i-node chain is still present, it's just that there's no name by which
another proces can access it. Presumably, the final close will release the
disk blocks of a marked-as-deleted file.
Correct. "The data is stored in memory only" is completely impractical - you
can still write much more data than will fit in RAM. One common mistake of new
Unix admins is to delete large log files from /var/spool when they're low on
disk space; if they do this without telling syslog to close the files first,
the space remains in use and can't be freed until syslog is killed and restarted.
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users