Re: Column Filtering in Logical Replication - Mailing list pgsql-hackers

From Justin Pryzby
Subject Re: Column Filtering in Logical Replication
Date
Msg-id 20220103144056.GB24477@telsasoft.com
Whole thread Raw
In response to Re: Column Filtering in Logical Replication  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: Column Filtering in Logical Replication
List pgsql-hackers
On Mon, Jan 03, 2022 at 11:31:39AM -0300, Alvaro Herrera wrote:
> > Did the DatumGetBool issue expose a deficiency in testing ?
> > I think the !am_partition path was never being hit.
> 
> Hmm, the TAP test creates a subscription that contains both types of
> tables.  I tried adding an assert for each case, and they were both hit
> on running the test.

Yes, I know both paths are hit now that it uses GetBool.

What I'm wondering is why tests didn't fail when one path wasn't hit - when it
said am_partition=DatumGetChar(); if (!am_partition){}

I suppose it's because the am_partition=true case correctly handles
nonpartitions.

Maybe the !am_partition case should be removed, and add a comment that
pg_partition_tree(pg_partition_root(%u))) also handles non-partitions.
Or maybe that's inefficient...

-- 
Justin



pgsql-hackers by date:

Previous
From: "Joel Jacobson"
Date:
Subject: Re: Foreign key joins revisited
Next
From: Nikhil Benesch
Date:
Subject: Re: Remove inconsistent quotes from date_part error