Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gQEUE-0003st-LI for pgsql-hackers@arkaria.postgresql.org; Fri, 23 Nov 2018 16:39:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gQEUB-0004el-Es for pgsql-hackers@arkaria.postgresql.org; Fri, 23 Nov 2018 16:39:19 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gQEUB-0004eY-3t for pgsql-hackers@lists.postgresql.org; Fri, 23 Nov 2018 16:39:19 +0000 Received: from xvm-110-146.dc2.ghst.net ([46.226.110.146] helo=fetter.org) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gQEU8-0003i4-EJ for pgsql-hackers@postgresql.org; Fri, 23 Nov 2018 16:39:17 +0000 Received: by fetter.org (Postfix, from userid 1001) id 5728E40D50; Fri, 23 Nov 2018 17:39:14 +0100 (CET) Date: Fri, 23 Nov 2018 17:39:14 +0100 From: David Fetter To: Petr Jelinek Cc: Euler Taveira , pgsql-hackers , Suzuki Hironobu Subject: Re: row filtering for logical replication Message-ID: <20181123163913.GK958@fetter.org> References: <7106a0fc-8017-c0fe-a407-9466c9407ff8@2ndquadrant.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <7106a0fc-8017-c0fe-a407-9466c9407ff8@2ndquadrant.com> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Fri, Nov 23, 2018 at 12:03:27AM +0100, Petr Jelinek wrote: > On 01/11/2018 01:29, Euler Taveira wrote: > > Em qua, 28 de fev de 2018 ās 20:03, Euler Taveira > > escreveu: > >> The attached patches add support for filtering rows in the publisher. > >> > > I rebased the patch. I added row filtering for initial > > synchronization, pg_dump support and psql support. 0001 removes unused > > code. 0002 reduces memory use. 0003 passes only structure member that > > is used in create_estate_for_relation. 0004 reuses a parser node for > > row filtering. 0005 is the feature. 0006 prints WHERE expression in > > psql. 0007 adds pg_dump support. 0008 is only for debug purposes (I'm > > not sure some of these messages will be part of the final patch). > > 0001, 0002, 0003 and 0008 are not mandatory for this feature. > > Hi, > > I think there are two main topics that still need to be discussed about > this patch. > > Firstly, I am not sure if it's wise to allow UDFs in the filter clause > for the table. The reason for that is that we can't record all necessary > dependencies there because the functions are black box for parser. Some UDFs are not a black box for the parser, namely ones written in SQL. Would it make sense at least not to foreclose the non-(black box) option? Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate