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

From Alvaro Herrera
Subject Re: Column Filtering in Logical Replication
Date
Msg-id 202201031501.gn2mtdiklb5y@alvherre.pgsql
Whole thread Raw
In response to Re: Column Filtering in Logical Replication  (Justin Pryzby <pryzby@telsasoft.com>)
List pgsql-hackers
On 2022-Jan-03, Justin Pryzby wrote:

> 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){}

Ah!

> 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...

Hmm, that doesn't sound true.  Running the query manually, you get an
empty list if you use pg_partition_tree(pg_partition_root) with a
non-partition.  Maybe what was happening is that all columns were being
transmitted instead of only the required columns.  Maybe you're right
that the test isn't complete enough.

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Index-only scans vs. partially-retrievable indexes
Next
From: Tom Lane
Date:
Subject: Re: Remove inconsistent quotes from date_part error