After spending a few more hours on this, I got convinced that upon
restarting guix-daemon, even though we had restored
/var/guix/db/db.sqlite, the presence of stale db.sqlite-{wal,shm} files
could lead sqlite to do as if transactions in the WAL file had been
committed.Commit 495c50008be91429ebea3805e161a1e385a2a572 deletes these two files, and it appears to solve the problem for me. I also pushed the patch previously shared in this thread, to make sure db.sqlite is only copied when guix-daemon is stopped. So we have this: 495c50008b installer: final: Delete SQLite WAL and shm files upon completion. 9b6703eabe installer: final: Stop guix-daemon before accessing store database. I’ll go ahead and prepare for the release as planned, to be published on Monday. Ludo’.
