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 1gI8NK-0007R8-Un for pgsql-hackers@arkaria.postgresql.org; Thu, 01 Nov 2018 08:30:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gI8NI-0003ea-Er for pgsql-hackers@arkaria.postgresql.org; Thu, 01 Nov 2018 08:30:44 +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 1gI8NI-0003eT-7X for pgsql-hackers@lists.postgresql.org; Thu, 01 Nov 2018 08:30:44 +0000 Received: from lb1-smtp-cloud9.xs4all.net ([194.109.24.22]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gI8NB-0001dK-3i for pgsql-hackers@postgresql.org; Thu, 01 Nov 2018 08:30:42 +0000 Received: from webmailclassic.xs4all.nl ([IPv6:2001:888:0:22:194:109:20:208]) by smtp-cloud9.xs4all.net with ESMTPA id I8NAgLoozSskCI8NAgx3sB; Thu, 01 Nov 2018 09:30:36 +0100 Received: from 2001:983:39b6:1:3d17:1a27:9300:59df by webmailclassic.xs4all.nl with HTTP (HTTP/1.1 POST); Thu, 01 Nov 2018 09:30:36 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Thu, 01 Nov 2018 09:30:36 +0100 From: Erik Rijkers To: Euler Taveira Cc: pgsql-hackers , Suzuki Hironobu Subject: Re: row filtering for logical replication In-Reply-To: <37d16603194380f43b0630ee1357d46f@xs4all.nl> References: <37d16603194380f43b0630ee1357d46f@xs4all.nl> Message-ID: <0bfccedb6ee196b3f5f4e3a96adadb03@xs4all.nl> X-Sender: er@xs4all.nl User-Agent: XS4ALL Webmail X-CMAE-Envelope: MS4wfHJV6KFtV90lRju0XhMWkM07KnlyIWbxwGQaNimZ7mX0R8CbziFpQDOuq10f0LGjg46gxZm61DVPKC1PgFjynEMZg8V288pDEXt7erogqHPCthgiEJt3 XVes2kW2zkJEUhVuDKuOjYupBjDAJ1qk9Nb7gIdEA8On0g7TUI67+ir39FFCB8MKNIMDPJRZSnc8s+icQBuV7X0GvarU7km8jAzRkJeDQ0J2BbgiS48DGrKq +cJ+uRXgSzfPBZN9sayoyT6DSvCEJn8ETBFhkK6H8oeyhZXPFiOYzHSIgp9hXhpZ List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2018-11-01 08:56, Erik Rijkers wrote: > On 2018-11-01 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 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 I have noticed that the failure to replicate correctly can be avoided by putting a wait state of (on my machine) at least 3 seconds between the setting up of the subscription and the start of pgbench. See the bash program I attached in my previous mail. The bug can be avoided by a 'sleep 5' just before the start of the actual pgbench run. So it seems this bug is due to some timing error in your patch (or possibly in logical replication itself). Erik Rijkers