From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Teemu Likonen Newsgroups: gmane.emacs.devel Subject: Re: sqlite3 Date: Tue, 07 Dec 2021 08:40:23 +0200 Message-ID: <877dcgq5ns.fsf@iki.fi> References: <87tufmjyai.fsf@gnus.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4611"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Notmuch/0.34.1+9~gd7f9572 (https://notmuchmail.org) Emacs/28.0.60 (x86_64-pc-linux-gnu) To: Lars Ingebrigtsen , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Dec 07 07:49:20 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1muUHw-00010A-IS for ged-emacs-devel@m.gmane-mx.org; Tue, 07 Dec 2021 07:49:20 +0100 Original-Received: from localhost ([::1]:49912 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1muUHu-00008I-Fx for ged-emacs-devel@m.gmane-mx.org; Tue, 07 Dec 2021 01:49:18 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:44250) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1muU9r-0006ao-KX for emacs-devel@gnu.org; Tue, 07 Dec 2021 01:40:59 -0500 Original-Received: from lahtoruutu.iki.fi ([185.185.170.37]:34468) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1muU9o-0007I3-3G for emacs-devel@gnu.org; Tue, 07 Dec 2021 01:40:58 -0500 Original-Received: from mithlond (mobile-access-6df04f-110.dhcp.inet.fi [109.240.79.110]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: tlikonen) by lahtoruutu.iki.fi (Postfix) with ESMTPSA id AFBC51B000E5; Tue, 7 Dec 2021 08:40:29 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1638859230; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=RsYWEQ4Y7DlsQDlvrmJJ0CjLG2oxxQ1IalIasGhLk74=; b=JoIP4Qugmm8D4rGOy32Z0eELsJUbj2BHnO+2gZqOzlvKo13MN5o0ecWijqcsng86SrW0qM xfQOhe7CvhhFFjCTuTUYdwieNSTNoPvN1u40/quvln4mRWSA1y22FPHridC3SwHvyN5eIW B6S7ngHxdLE2hdb/8VM3VV9ndzcgLRHfDvNeoing464TVz2T1J3YvFZl4w9uB23g6r48P3 TsbnfjbKqh4mg5/hUfQvCkI39umrT7xZ+qG6nnqXUHzmvQiJGWDu3xW1BVC2w3hi1QpRe5 48hE4GeWrGzUqvs4tPFxNdEJlrgrPX0GCv2A4SuuG5oBL3MsGNDX+Y2SfmsG5Q== In-Reply-To: <87tufmjyai.fsf@gnus.org> ARC-Seal: i=1; s=lahtoruutu; d=iki.fi; t=1638859230; a=rsa-sha256; cv=none; b=QFABENBBSaZzYdQuH6v6b9sO+S7zqCv9Nwa6LnA/1sa4ABFoRMJNJksYSlt/M51vo1h/u6 5P8szT9bwMtZ2Stur+PO3mZgf3R288+mK/tI559GRW0neAgVNdKGpR7Qwm0ka5wyTTMlDN GVdadIdHKqcbCpiSugrwMwReGDv8nqMpAp3klHg7GgxaGqGjGIi0RYSshZd78ZTV4oJQeY 8Lcmzlw2Mm5nbeFzK4yqdVWaxLpzeGpnUWH+rV2Vn7AwOSjOEiAhbrUCQuVtlPfQ6q5Q2E 8hjpfl/gh044H8HyhDAxqWMHpafZ4JeXjdci6JhtpHQDjZ/7RG7i5szAlVPIgw== ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=tlikonen smtp.mailfrom=tlikonen@iki.fi ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1638859229; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=RsYWEQ4Y7DlsQDlvrmJJ0CjLG2oxxQ1IalIasGhLk74=; b=rUq19UWo37MYh+4rPrAzxgTvl4rT/0rdPJH6+EQLKNwk/q65XTMnSvXFFh/gvfbPKycWt1 RO2upgnhD5duk6i67QJMjCDTUC8383cZgdbRWdHXaSsOPFLFzfreup+sSBrt2xE6sb8LSr +MBJCbF47UDm3dZSVvxullOJoW6b0jlCB+bj8a20L9xDSyhfdweY7f9yDBX5c81i/sDosA EP85sgOl8rGCDOzQVHvhetcQqVU/Z8hiIZa49jFXJOpwzdDNi/7UKxMh1zcN+3+Crflnev NfHK/Er5fd9dWa2mYdkBRkb2XY45I0GqwioNQFLCk8BddC6lW1j+Bikru2hXrA== Received-SPF: pass client-ip=185.185.170.37; envelope-from=tlikonen@iki.fi; helo=lahtoruutu.iki.fi X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:281213 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable * 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=20SQLite'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 =3D 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 =3D FULL". It fixes possible defragmentation of database. See: https://sqlite.org/pragma.html#pragma_auto_vacuum =2D-=20 /// Teemu Likonen - .-.. https://www.iki.fi/tlikonen/ // OpenPGP: 6965F03973F0D4CA22B9410F0F2CAE0E07608462 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIYEARYIAC4WIQQL23klfGMkeOvdGCt57xklfWtWWwUCYa8B1xAcdGxpa29uZW5A aWtpLmZpAAoJEHnvGSV9a1ZbLa8BAJkdldTJDI3dcqk/SLb11d0M5QV14Xa5TpD9 ADwF/QdWAP4svN9LYdVQAwChyVlkBsVxfRx7b74BKJGtsPuqSv3HAoiGBAEWCAAu FiEEyVtsKrXpcQtYB3W4rZ11q+6UwnMFAmGvAdwQHHRsaWtvbmVuQGlraS5maQAK CRCtnXWr7pTCc/MjAP9W7PpLWmqGJC3nVXo0Nx3DL14hAJrYhZFdgYYL77QdPgD+ Pn7l9bsHSSzEHKRgZzVulX6IMBvsCrBEwd5xY1VeOwg= =PWcI -----END PGP SIGNATURE----- --=-=-=--