Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gITMT-0001Fo-LF for pgsql-hackers@arkaria.postgresql.org; Fri, 02 Nov 2018 06:55:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gITMR-00038V-08 for pgsql-hackers@arkaria.postgresql.org; Fri, 02 Nov 2018 06:55:14 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gITMQ-00037j-Om for pgsql-hackers@lists.postgresql.org; Fri, 02 Nov 2018 06:55:14 +0000 Received: from lb1-smtp-cloud8.xs4all.net ([194.109.24.21]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gITML-00085X-8r for pgsql-hackers@postgresql.org; Fri, 02 Nov 2018 06:55:14 +0000 Received: from webmailclassic.xs4all.nl ([IPv6:2001:888:0:22:194:109:20:207]) by smtp-cloud8.xs4all.net with ESMTPA id ITMHg0RyY0ZZEITMHg6Qex; Fri, 02 Nov 2018 07:55:07 +0100 Received: from 2001:983:39b6:1:15f1:e2fb:5864:cdd0 by webmailclassic.xs4all.nl with HTTP (HTTP/1.1 POST); Fri, 02 Nov 2018 07:55:05 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Fri, 02 Nov 2018 07:55:05 +0100 From: Erik Rijkers To: Euler Taveira Cc: pgsql-hackers , Suzuki Hironobu Subject: Re: row filtering for logical replication In-Reply-To: References: <37d16603194380f43b0630ee1357d46f@xs4all.nl> <0bfccedb6ee196b3f5f4e3a96adadb03@xs4all.nl> Message-ID: X-Sender: er@xs4all.nl User-Agent: XS4ALL Webmail X-CMAE-Envelope: MS4wfOBQ29s/+S5EvCFHv949apWan7H2Wy6k4sjGqxUayToP1EJgmCNJrxjjIKl+zIOQx0dBH8XupjOStbwd3bVfiUrG2sjaMQ4HOchGTMFeXB32XgtrXvKv nJHLbcCPdr/O9xeT5LAchknyOZ4mleCHzFwmZ/7ECfkgTtxonvVdmaxpPE36QUls5SZqeGqYU9x3jzVsmuxCErMIzyULQdB80kk6XhUydAkuF32CYQfV0jBA vJbVLfmBnBaqomXgHkWFpc+fJve64ClGmstqr1Hx9OpgDzObfPENTCmZ5fjliCz9 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2018-11-02 02:59, Euler Taveira wrote: > Em qui, 1 de nov de 2018 às 05:30, Erik Rijkers > escreveu: >> > I ran pgbench-over-logical-replication with a WHERE-clause and could >> > not get this to do a correct replication. Below is the output of the >> > attached test program. >> > >> > >> > $ ./logrep_rowfilter.sh >> > Erik, thanks for testing. > >> So it seems this bug is due to some timing error in your patch (or >> possibly in logical replication itself). >> > It is a bug in the new synchronization code. I'm doing some code > cleanup/review and will post a new patchset after I finish it. If you > want to give it a try again, apply the following patch. > > diff --git a/src/backend/replication/logical/tablesync.c > b/src/backend/replication/logical/tablesync.c > index e0eb73c..4797e0b 100644 > --- a/src/backend/replication/logical/tablesync.c > +++ b/src/backend/replication/logical/tablesync.c > [...] That does indeed fix it. Thank you, Erik Rijkers