RE: row filtering for logical replication - Mailing list pgsql-hackers

From tanghy.fnst@fujitsu.com
Subject RE: row filtering for logical replication
Date
Msg-id OS0PR01MB611389E3A5685B53930A4833FB609@OS0PR01MB6113.jpnprd01.prod.outlook.com
Whole thread Raw
In response to Re: row filtering for logical replication  (Peter Smith <smithpb2250@gmail.com>)
Responses Re: row filtering for logical replication
Re: row filtering for logical replication
List pgsql-hackers
On Thursday, November 18, 2021 9:34 AM Peter Smith <smithpb2250@gmail.com> wrote:
> 
> PSA new set of v40* patches.
> 

I found a problem on v40. The check for Replica Identity in WHERE clause is not working properly.

For example:
postgres=# create table tbl(a int primary key, b int);
CREATE TABLE
postgres=# create publication pub1 for table tbl where (a>10 and b>10);
CREATE PUBLICATION

I think it should report an error because column b is not part of Replica Identity.
This seems due to "return true" in rowfilter_expr_replident_walker function,
maybe we should remove it.

Besides, a small comment on 0004 patch:

+         * Multiple row-filter expressions for the same publication will later be
+         * combined by the COPY using OR, but this means if any of the filters is

Should we change it to: 
Multiple row-filter expressions for the same table ...

Regards,
Tang

pgsql-hackers by date:

Previous
From: Bharath Rupireddy
Date:
Subject: pg_replslotdata - a tool for displaying replication slot information
Next
From: Andres Freund
Date:
Subject: Re: Removing more vacuumlazy.c special cases, relfrozenxid optimizations