From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id EEGUM7ts12U1PQEAe85BDQ:P1 (envelope-from ) for ; Thu, 22 Feb 2024 16:48:12 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id EEGUM7ts12U1PQEAe85BDQ (envelope-from ) for ; Thu, 22 Feb 2024 16:48:12 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers eddsa verify failed") header.d=russelstein.xyz header.s=ed25519 header.b=bKIln58N; dkim=fail ("headers rsa verify failed") header.d=russelstein.xyz header.s=rsa header.b=KwivW8JA; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1708616891; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=dZGYyWQi643lgjdNVH8GqbuuYDUoCB9SyRQltb3cKLM=; b=iIku3ylO+oKTIGIzICDt8UckOTzrPMkTkFPaX9qLoWFSWcCHDPimaHE0xa5Ac4Jhpsf7+r sHTIRFcJGtjLSXeJvwBRv36/nwZwnfBBHrV9CMq03ghLWx7LFaGGPgOoY4o3GRerrFAbNZ QW6vuN9XYMIIpyF3cgKu1iKqcFBFzlfsu+8A8SwX+lo+bl4wjACnY1m3+YQaoLnJHc6hbr +86gAVZzJokHPVSSrhvyWQWOvDYbachYzuGRSq/5XJbLIrh+9htJZrdiMWehBe015ZuTvr NRLVOsy+zTLN5FsHlhriWWbqJV3iRIah5TByEZwpPPTLq0I10srxUY0UDfqOYg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers eddsa verify failed") header.d=russelstein.xyz header.s=ed25519 header.b=bKIln58N; dkim=fail ("headers rsa verify failed") header.d=russelstein.xyz header.s=rsa header.b=KwivW8JA; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1708616891; a=rsa-sha256; cv=none; b=SL4j9FAeRQXCKXJNkuJHqDP8nesB8DNOZkfE6St140pDN/2xJFq9YkQnNzsclwI2S9OWrq cN/SMghdwTpkWs1BZ0jGeVcxkqNHOPHNa2P7CiEdaSZvztrePvUOCcblSNyciCAOtkAFS4 0FCkL2myDk7dGZBTXt+ki+GWotammi+/0NcvbjSeR/sU/Rjs2ixBjNr3dxfXQcGOaMxoP/ elturTkqzXjkr5c6GxeeLG8ZEU/imT/gC+I7iEvoKxibx5wXaoptRHieiUGUsRh0NgSLIv 9aVWwumgBctBnOKoDspwJ6gOfLLHII+2iIetNfth1BEyV/j2EaYNV9bRMpPIhA== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id D4D015C588 for ; Thu, 22 Feb 2024 16:48:10 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rdBIo-0005Rx-7w; Thu, 22 Feb 2024 10:48:02 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rdA33-0005Bj-A6 for guix-patches@gnu.org; Thu, 22 Feb 2024 09:27:43 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rdA33-0006GR-0Z for guix-patches@gnu.org; Thu, 22 Feb 2024 09:27:41 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rdA3O-0006IY-SM for guix-patches@gnu.org; Thu, 22 Feb 2024 09:28:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#69292] [PATCH 4/6] store: database: Stop finalizing prepared statements. Resent-From: reepca@russelstein.xyz Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 22 Feb 2024 14:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69292 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Christopher Baines Cc: 69292@debbugs.gnu.org Received: via spool by 69292-submit@debbugs.gnu.org id=B69292.170861203924017 (code B ref 69292); Thu, 22 Feb 2024 14:28:02 +0000 Received: (at 69292) by debbugs.gnu.org; 22 Feb 2024 14:27:19 +0000 Received: from localhost ([127.0.0.1]:58155 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rdA2g-0006FF-59 for submit@debbugs.gnu.org; Thu, 22 Feb 2024 09:27:19 -0500 Received: from mailout.russelstein.xyz ([209.141.47.21]:54288) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rd8hR-0002PB-3G for 69292@debbugs.gnu.org; Thu, 22 Feb 2024 08:01:18 -0500 DKIM-Signature: v=1; a=ed25519-sha256; q=dns/txt; c=relaxed/relaxed; d=russelstein.xyz; s=ed25519; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=dZGYyWQi643lgjdNVH8GqbuuYDUoCB9SyRQltb3cKLM=; b=bKIln58N9JCXEW5lENTrIrWyh0 iBcQnuJZ5/9MqcZmwRoDigdl0OYeVWgRHosKwb/OVE0ahwYGZ7JYuwzKRaBw==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=russelstein.xyz; s=rsa; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=dZGYyWQi643lgjdNVH8GqbuuYDUoCB9SyRQltb3cKLM=; b=KwivW8JA1ylQElXAOpU/IszeDG PQIYjlTpbHrj4pPVMZY42f1qMt1Xpk8AbXoQVsyklVrjPGcIbiXWu3I2lolx1sLD6mLBu0MHveNmh evlw8BGGM8yx4sYp0pacgs2KX8zzUlESG0bIK+cI3PZqjEA1PpYUP8nJhWUPwpcCPILIqFef7tLtg ENwixRtUymYwrRMaQ3CyYa8JtJwVc9bYG9Pr5aPal5HFsA9yASPddD+fp7UfHugjBq9mOLlPmDLR+ YmV5s0s5y2joQjzgYjwMz25vEGqeEYX4vl1GjGwLfPOUtKAO4llZAF+aNg7BDSeAceWdjmjE2aKlr naLGEFhA7siCAwvzCMS5+FGfZ8J7B1qmtaZYO7MSkx9+ueWWRj1HChNt3fmOX2Ki1O/jCUUrW2C6j 4ICane4So2irnTmpCzRl6Xx+AdN2VQ/8lBNLUuK3FG3fV2HBkraybn90S1C41ieL1aQchJplQrZnC TG+8cxsoa+77deRt8pRjdWz4MYbSDGoo4JcmTu+Gd/hWDIcwLcrY+Il4Uy2QI6GtQqrE6ffXuXLfj 3fZc0zp/+DWy+Pn/YCvro1JGeqXsYSqD1swj+YuSGGIB6xJEEEfdpum5dDxKub3TnowQnNC6EwsA9 WVBOtXb3PlP8IfIA2UucaLdpOtjo69k7LEVAEeR7Q=; Received: by russelstein.xyz with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96.1) (envelope-from ) id 1rd8Mn-000000008Om-351k; Thu, 22 Feb 2024 06:39:58 -0600 In-Reply-To: (Christopher Baines's message of "Tue, 20 Feb 2024 19:39:04 +0000") References: <4b6a268daab5e0b307dff2229d551a47c9fe1ebc.1708457946.git.mail@cbaines.net> User-Agent: Gnus/5.13 (Gnus v5.13) Date: Thu, 22 Feb 2024 06:39:37 -0600 Message-ID: <87y1bcr7ue.fsf@a.a> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Mailman-Approved-At: Thu, 22 Feb 2024 09:27:16 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Thu, 22 Feb 2024 10:47:59 -0500 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: reepca@russelstein.xyz X-ACL-Warn: , reepca--- via Guix-patches From: reepca--- via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -8.74 X-Spam-Score: -8.74 X-Migadu-Queue-Id: D4D015C588 X-Migadu-Scanner: mx11.migadu.com X-TUID: AhpudhH6AuiU --=-=-= Content-Type: text/plain Christopher Baines writes: > Especially since we're asking for these to be cached. > > Management of prepared statements isn't trivial, since you don't want to keep > them forever as this can lead to poor query performance, but I don't think > that finalizing them immediately is the right solution. guile-sqlite3 arranges for cached statements to only be reset, not finalized, when sqlite-finalize is called on them (see https://notabug.org/guile-sqlite3/guile-sqlite3/src/master/sqlite3.scm.in#L283). The idea behind this admittedly-unintuitive behavior is that it allows for the caching behavior of a statement to be decided independently of the code that actually uses it: if it's been decided elsewhere that a prepared statement is worth keeping around, it will reuse it, but if it hasn't, it will still properly clean up what it created. Perhaps reusing the name 'sqlite-finalize' to make that behavior transparent wasn't the best choice in the long run. I hope that makes the way it was written a bit less baffling. - reepca --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFLBAEBCAA1FiEEdNapMPRLm4SepVYGwWaqSV9/GJwFAmXXQIkXHHJlZXBjYUBy dXNzZWxzdGVpbi54eXoACgkQwWaqSV9/GJxKiAf/fsuX+zHXnKGCOIzBXAbWsW9H cf6cY/5FQK/55CUQhqJ8f4+xsM8ldIgXMcNs1Nwx2gvHCAiyUOnDFrpg6zJI7Iw3 oQnQoa62L+3YtbXM60kuk3cgd/1u0Bi8euNJFdA2CdkUlHt2OkbJ0UlK6he+LCH8 BaUh7hvKxBa1gYixB8P8G4+7B8mLnlb8eFeMMGWi8cO19wPwHgr/m54qWr6KKhzl +rTamrOa3Q9Ju1Jm38Qo0b6gpX9agQ9bPrhOKGmxURgjmU274JayHg+Fuwoxz9TJ ydo781BYQpvuvFuiUMgonOBsEIBT5jJE5RQhubuCzTC2CvKrZ7MSHQ2vdwFbzA== =mr/M -----END PGP SIGNATURE----- --=-=-=--