title: Is it safe to delete sqlite's WAL file?
body: <p>I have a strange problem with Core Data in an iOS app where sometimes the WAL file becomes <em>huge</em> (~1GB). It appears there are other people with the problem (e.g. <a href="https://stackoverflow.com/questions/20228486/core-data-sqlite-wal-file-gets-massive-7gb-when-inserting-5000-rows">Core Data sqlite-wal file gets MASSIVE (&gt;7GB) when inserting ~5000 rows</a>).</p>
  
  <p>My initial thought is to delete the WAL file at app launch. It seems from reading the sqlite documentation on the matter that this will be fine. But does anyone know of any downsides to doing this?</p>
  
  <p>I'd of course like to get to the bottom of why the WAL file is growing so big, but I can't get to the bottom of it right now and want to put in a workaround while I dig deeper into the problem.</p>
  
  <p>It's worth pointing out that my Core Data database is more of a cache. So it doesn't matter if I lose data that's in the WAL. What I really need to know is, will the database be completely corrupted if I delete the WAL? My suspicion is no, otherwise the WAL doesn't serve one of its purposes.</p>