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 1m3NyF-000375-OI for pgsql-hackers@arkaria.postgresql.org; Tue, 13 Jul 2021 19:21:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m3NyE-0002tR-MK for pgsql-hackers@arkaria.postgresql.org; Tue, 13 Jul 2021 19:21:30 +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 1m3NyE-0002tJ-EX for pgsql-hackers@lists.postgresql.org; Tue, 13 Jul 2021 19:21:30 +0000 Received: from new4-smtp.messagingengine.com ([66.111.4.230]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m3Ny7-0005GQ-QN for pgsql-hackers@lists.postgresql.org; Tue, 13 Jul 2021 19:21:29 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailnew.nyi.internal (Postfix) with ESMTP id BE503580871; Tue, 13 Jul 2021 15:21:21 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Tue, 13 Jul 2021 15:21:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=lCp3XeIPXoWyqGDkdnKGRDiNUpwk/0kJhU6h+7OlsrI=; b=dCB9WpAD v5zJqH6QuroBIUcvTe5B3iEdD5bAzrx7iNPWrBQBH83Uex6EywLJ/uoSJmZTrBfc NykPhRN1IyQteevhj+ejkenaHQ9sEvHNr0n2HUIvpNqmWwWC8Z2Z1qGSy0jRrXVC 9EFe3BHnPveCZmqtd3yU+pWrF1N+75lvg2NoXp5pCkxRsuijL6JmE7v/MglryRXt 9nTGTHb4bOsdgGSdPIIyRfYDtDXgfkvBI4uS3Std+qMQNmY03YtUqv1QyyGW6yYm 4zU+wzpMcN+pbOfLBJVr6eqtCMoZmn9n0y3kbvwZJrclICpFvTmjzR1lBBD6evdF Pev+8g5CQfL7Tg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudehgdduvdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfggtggugfgjsehtkeertddttdejnecuhfhrohhmpeetlhhvrghr ohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhgqe enucggtffrrghtthgvrhhnpedujeevjeffjeevuddutedvkeeiueeitddvieelfeekveej udefgeeuvdejhfeuleenucffohhmrghinhepvghnthgvrhhprhhishgvuggsrdgtohhmne cuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhh vghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 13 Jul 2021 15:21:20 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id BE69C2A0A4F; Tue, 13 Jul 2021 15:21:17 -0400 (-04) Date: Tue, 13 Jul 2021 15:21:17 -0400 From: Alvaro Herrera To: Tomas Vondra Cc: Jeff Davis , Amit Kapila , Euler Taveira , Greg Nancarrow , Peter Smith , Rahila Syed , Peter Eisentraut , =?utf-8?B?w5ZuZGVyIEthbGFjxLE=?= , japin , Michael Paquier , David Steele , Craig Ringer , Tomas Vondra , Amit Langote , PostgreSQL Hackers Subject: Re: row filtering for logical replication Message-ID: <202107131921.r3w3hv2uvuij@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <86dcff6e-9b5f-0f9a-8602-69a5602a30c9@enterprisedb.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2021-Jul-13, Tomas Vondra wrote: > On 7/13/21 5:44 PM, Jeff Davis wrote: > > * Andres also mentioned that the function should not leak memory. > > * One use case for this feature is when sharding a table, so the > > expression should allow things like "hashint8(x) between ...". I'd > > really like to see this problem solved, as well. > > I think built-in functions should be fine, because generally don't get > dropped etc. (And if you drop built-in function, well - sorry.) > > Not sure about the memory leaks - I suppose we'd free memory for each row, > so this shouldn't be an issue I guess ... I'm not sure we need to be terribly strict about expression evaluation not leaking any memory here. I'd rather have a memory context that can be reset per row. -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/