Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kre0z-0006ln-4Y for psycopg@arkaria.postgresql.org; Tue, 22 Dec 2020 09:31:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kre0x-0005im-Sn for psycopg@arkaria.postgresql.org; Tue, 22 Dec 2020 09:31:31 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kre0x-0005if-NE for psycopg@lists.postgresql.org; Tue, 22 Dec 2020 09:31:31 +0000 Received: from mout.gmx.net ([212.227.17.21]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kre0v-0008Ks-Fs for psycopg@postgresql.org; Tue, 22 Dec 2020 09:31:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1608629486; bh=LlrmCQHe6C9Vs9s8S3KyumIj31UoFvFrw4sVEWL9TWQ=; h=X-UI-Sender-Class:From:Cc:Subject:Date:In-Reply-To:References; b=P6OOIio25lFvZcXmIULQjmG2vZToHrrCyraa4wQF7qMyP2fQtWBuWsCwzfzeb9wOY CN9DrvWLKRKW1AYkB6Gxig/KITc2NPy+FEB/1qe/i5dO2JZXKZmrvqEzyWAh7MrtM0 rfCRv60YX/ACMPnT3498XX4UdBE2dVuZWRxI0VBI= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [217.91.207.107] ([217.91.207.107]) by web-mail.gmx.net (3c-app-gmx-bs15.server.lan [172.19.170.67]) (via HTTP); Tue, 22 Dec 2020 10:31:26 +0100 MIME-Version: 1.0 Message-ID: From: Karsten Hilbert Cc: psycopg@postgresql.org Subject: Aw: Re: psycopg3, prepared statements Content-Type: text/plain; charset=UTF-8 Date: Tue, 22 Dec 2020 10:31:26 +0100 Importance: normal Sensitivity: Normal In-Reply-To: References: <25a137a0-9ad3-bb9f-b008-263dcc81a645@aklaver.com> <331f273f-fc13-8d80-b209-c94c0960268b@aklaver.com> Content-Transfer-Encoding: quoted-printable X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:jEYWnLGC8IKCfi2QxS0CxEd28o3ZvEIKGSm5WSo2Yqz3wQ051wC5Zba8thEuPKCCPkMzT jGTwQV8mUMA+np9/jbFLqde1PUxKbeZUjopLXABE4tGsY189wth/19cnGQMeDFGwumi6sUQOeCtt qLPgPcp1rqvpDsBShsi4rAyoW7CR0F3UeBFmXZ7yXnbns16EJzrjamnr91QJygQH8OLEWoCIczHX KgsIFS1j2OKfYUM5aFm/jqL5UUYhVyH2Ca3hPmXX+CMTq0qTBML1URnjlSxxm/BaqiOuHc72P9QK iE= X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:IFfish5Htmk=:KTtVeVOMrnNgAiS2gD919q 7m8S2rCAzvOYQtgutoSG9dx2FHIr/a4A+CRtrC5PeTDMZ0fwONiUsgMLZNFDPLRlvgaiqm7Tb +askZavGhJyy5aRQdM43I63NfprnzUJA/9idCX40xIRC+LOn0SOzMhB36gVbeaX52juRKLAK+ DOQE9YwlAme1RSyBaRWZpxyz4NGi8pTYMDgxKW07hbq4v3pMF7FKRK2qNSafk0lMKreZpV23Y xSTT1e2z8t6lRYsnsB03fNiZm2smLqeUbMwplRTnH7YtHQNOKuiCEvRSP+NFQR7SpFbLgV3dJ /RZzUQ5+wo5+RQOqUixwRXiMB1xMNFjcCBd/aldq8TObStGs9FimgoFU1807jNTFF3R9Pxik0 Lf7yt+KO6asAsAAcnooGzB1N/G52IZUhftOMc7cTAu5r4IylE7M+yhNEFOGbrKL9NoRsrDBe6 3tu1gYl2BQ84Q6uBVYyIUv0ZP5jejNm9YbmWDEQRhbU9waPK1rQ3IXy37/S8u0ZUupF9SPzdZ 69Yh+As0gOZdlhIxhpM/RbHiGHUyAfu25Qtnr7xOCzh2f4NIzCdSNPIwq2f1VuYjYBsk3pDBD Gb10fQPau3RNI= List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk =C2=A0 >> - if more than `connection=2Eprepared_number` queries are prepared, the= > one >> used least recently is deallocated and evicted from the cache >> (proposed default: 100)=2E =C2=A0 >Why do you need such logic? Why not just keep some limited number of >prepared statements? Is it a problem if a PS is in cache but rarely used? On resource constrained environments one wants to be able to balance use vs disuse=2E Here I agree with Adrian: automagic, yes but only if one can opt out by default=2E Karsten =C2=A0