> On Feb 15, 2017, at 9:51 PM, Roman Fleysher <roman.fleys...@einstein.yu.edu> 
> wrote:
> 
> My mistake: I do not update DB. I rename (unix mv) the DB.

I wouldn’t recommend doing that to an open database!

(a) I don’t think it’s formally specified when SQLite opens or closes the 
database file. It’s possible it might close and reopen it at some point, in 
which case it would probably open the old path and suddenly be seeing a 
different file.
(b) Any side files like the -wal and -shm files used by WAL, or the .journal 
file, will be left behind. SQLite will probably keep using them at the old 
location. But if you close the handle and then reopen it on the moved file, 
those side files will now be missing, which could result in database corruption.
(c) As noted, the semantics of mv differ depending on whether the paths are on 
the same filesystem, and the effects on an open sqlite database would be 
completely different.

—Jens
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to