Re: Skipping schema changes in publication - Mailing list pgsql-hackers

From vignesh C
Subject Re: Skipping schema changes in publication
Date
Msg-id CALDaNm32XQDR4qsOhPQeophVbZ8r+ShJSSssoVfdPcwG6joPHQ@mail.gmail.com
Whole thread Raw
In response to Re: Skipping schema changes in publication  (Shlok Kyal <shlok.kyal.oss@gmail.com>)
Responses Re: Skipping schema changes in publication
List pgsql-hackers
On Fri, 5 Sept 2025 at 11:57, Shlok Kyal <shlok.kyal.oss@gmail.com> wrote:
>
> On Mon, 25 Aug 2025 at 13:38, Shlok Kyal <shlok.kyal.oss@gmail.com> wrote:
> >
> > On Thu, 21 Aug 2025 at 05:33, Peter Smith <smithpb2250@gmail.com> wrote:
> > >
> > > Hi Shlok,
> > >
> > > I reviewed your latest v20-0003 patch and have no more comments at
> > > this time; I only found one trivial typo.
> > >
> > > ======
> > > src/bin/psql/describe.c
> > >
> > > 1.
> > > + /*
> > > + * Footers entries for a publication description or a table
> > > + * description
> > > + */
> > >
> > > Typo. /Footers entries/Footer entries/
> > >
> >
> > I have fixed it and attached the updated patches
> >
> The patches were not applying on HEAD and needed a Rebase. Here is the
> rebased patches

Few comments:
1) Currently from pg_publication_tables it is not clear if it is
replicating column list or replicating exclude column, can we indicate
if it is exclude or not:
create publication pub1 for table t1(c1);
create publication pub2 for  table t1 except ( c1);

postgres=# select * from pg_publication_tables;
 pubname | schemaname | tablename | attnames | rowfilter
---------+------------+-----------+----------+-----------
 pub1    | public     | t1        | {c1}     |
 pub2    | public     | t1        | {c2}     |
(2 rows)

2) Tab completion is not correct in this case:
postgres=# alter publication pub3 add table t2 EXCEPT (
,        WHERE (

3) tab6 is not used anywhere, it can be removed:
+       CREATE TABLE tab5 (a int, b int, c int);
+       CREATE TABLE tab6 (agen int GENERATED ALWAYS AS (1) STORED,
bgen int GENERATED ALWAYS AS (2) STORED);
+       INSERT INTO tab1 VALUES (1, 2, 3);

4) both these tests are using same message:
+  $node_subscriber->safe_psql('postgres', "SELECT * FROM tab1 ORDER BY a");
+is( $result, qq(|2|3
+|5|6),
+       'check incremental insert for EXCEPT (column-list) publication');
+$result = $node_subscriber->safe_psql('postgres',
+       "SELECT * FROM sch1.tab1 ORDER BY a");
+is( $result, qq(1||
+4||), 'check incremental insert for EXCEPT (column-list) publication');

we can include table name here to differentiate the test that will
help in identifying test failure easily

5) /newly added column are is replicated/ should be "newly added
column is replicated"
is($result, qq(|||10), 'newly added column are is replicated');

Regards,
Vignesh



pgsql-hackers by date:

Previous
From: Dilip Kumar
Date:
Subject: Re: Proposal: Conflict log history table for Logical Replication
Next
From: "Hayato Kuroda (Fujitsu)"
Date:
Subject: RE: Remove obsolate comments from 047_checkpoint_physical_slot