* 2021-12-06 02:51:33+0100, Lars Ingebrigtsen wrote: > I.e., what Emacs needs is a persistent key/value store, and this would > give us that. > In addition, if somebody really wants to write SQL stuff (it can be > very handy for some things), having sqlite3 in there gives us that in > addition for free. Excellent! Real SQL and relational database is useful and needed in some situations but a simple Lispy key-value storage is nice and enough for most use-cases. > This comes with questions about how the users are supposed be able to > clear out the data, for instance, but we could have a `M-x > list-persistent-data' where the users could blow out whatever they > want to. From SQLite's point of view, by default, it only grows database files. Deleted data in tables are just marked free and the space is filled later by a new data. I think Emacs users would want automatic VACUUM so that they never need to worry about it. (1) One option for that is to set SQLite's PRAGMA auto_vacuum = FULL; before any tables are created in database. (2) Another options is to maintain a modify counter in the database and issue SQL's VACUUM when the number of modifications exceeds some limit. It's actually good idea to run vacuum from time to time anyway, even if "auto_vacuum = FULL". It fixes possible defragmentation of database. See: https://sqlite.org/pragma.html#pragma_auto_vacuum -- /// Teemu Likonen - .-.. https://www.iki.fi/tlikonen/ // OpenPGP: 6965F03973F0D4CA22B9410F0F2CAE0E07608462