drymonfidelia
V2EX  ›  数据库

sqlite 需要彻底移除已删除的敏感字段,跑一下 VACUUM 就够物理删除了吗?

  •  
  •   drymonfidelia · May 8, 2025 · 2625 views
    This topic created in 405 days ago, the information mentioned may be changed or developed.
    2 replies    2025-05-09 10:06:57 +08:00
    liuidetmks
        1
    liuidetmks  
       May 9, 2025   ❤️ 1
    最稳妥的方法是,你自己试一试,用 hex 编辑器看看到底有没有删除
    liuidetmks
        2
    liuidetmks  
       May 9, 2025
    文档说了,确实是删了

    When content is deleted from an SQLite database, the content is not usually erased but rather the space used to hold the content is marked as being available for reuse. This can allow deleted content to be recovered by a hacker or by forensic analysis. Running VACUUM will clean the database of all traces of deleted content, thus preventing an adversary from recovering deleted content. Using VACUUM in this way is an alternative to setting PRAGMA secure_delete=ON.
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5046 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 53ms · UTC 07:32 · PVG 15:32 · LAX 00:32 · JFK 03:32
    ♥ Do have faith in what you're doing.