I have a DB in WAL mode. I need to replace the whole database while there are precesses still connected. These processes are supposed to re-connect by external event. I can not do it logically (using SQL) because it would be very slow. If it were single file, It would be easy. But unfortunatelly there is a WAL. I afraid of race-conditions when DB file is replaced, but WAL from OLD db is still there.