Re: Column Filtering in Logical Replication

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Justin Pryzby <pryzby(at)telsasoft(dot)com>
Cc: Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, "houzj(dot)fnst(at)fujitsu(dot)com" <houzj(dot)fnst(at)fujitsu(dot)com>, Rahila Syed <rahilasyed90(at)gmail(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Column Filtering in Logical Replication
Date: 2022-01-03 14:31:39
Message-ID: 202201031431.akwhcx6xrusu@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2021-Dec-31, Justin Pryzby wrote:

> > @@ -5963,8 +5967,20 @@ describePublications(const char *pattern)
> > {
> > + " CASE WHEN pr.prattrs IS NOT NULL THEN\n"
> > + " pg_catalog.array_to_string"
> > + "(ARRAY(SELECT attname\n"
> > + " FROM pg_catalog.generate_series(0, pg_catalog.array_upper(pr.prattrs::int[], 1)) s,\n"
> > + " pg_catalog.pg_attribute\n"
> > + " WHERE attrelid = c.oid AND attnum = prattrs[s]), ', ')\n"
> > + " ELSE NULL END AS columns");

> I suppose this should use pr.prattrs::pg_catalog.int2[] ?

True. Changed that.

Another change in this v15 is that I renamed the test file from ".patch"
to ".pl". I suppose I mistyped the extension when renumbering from 021
to 028.

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

--
Álvaro Herrera 39°49'30"S 73°17'W — https://www.EnterpriseDB.com/
"La persona que no quería pecar / estaba obligada a sentarse
en duras y empinadas sillas / desprovistas, por cierto
de blandos atenuantes" (Patricio Vogel)

Attachment Content-Type Size
v15-0001-Support-column-lists-for-logical-replication-of-.patch text/x-diff 73.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joel Jacobson 2022-01-03 14:39:36 Re: Foreign key joins revisited
Previous Message tushar 2022-01-03 14:09:58 Re: refactoring basebackup.c