Re: Pgoutput not capturing the generated columns
Amit Kapila <amit.kapila16@gmail.com>
On Wed, Oct 23, 2024 at 12:26 PM Peter Smith <smithpb2250@gmail.com> wrote: > > On Wed, Oct 23, 2024 at 5:21 PM Amit Kapila <amit.kapila16@gmail.com> wrote: > > > Additional comment on the 0003 patch > > +# ============================================================================= > > +# Misc test. > > +# > > +# A "normal -> generated" replication. > > +# > > +# In this test case we use DROP EXPRESSION to change the subscriber generated > > +# column into a normal column, then verify replication works ok. > > +# ============================================================================= > > > > In patch 0003, why do we have the above test? This doesn't seem to be > > directly related to this patch. > > > > -- > > Perhaps the test should be turned around, to test this feature more directly... > > e.g. Replication of table tab(a int, b int) ==> tab(a int, b int, c int) > > test_pub=# create table tab(a int, b int); > > then, dynamically add a generated column "c" to the publisher table > test_pub=# alter table tab add column c int GENERATED ALWAYS AS (a + b) STORED; > test_pub=# insert into tab values (1,2); > > then, verify that replication works for the newly added generated > column "c" to the existing normal column "c" at the subscriber. > This is testing whether the invalidation mechanism works for this case which I see no reason to not work as this patch hasn't changed anything in this regard. We should verify this but not sure it will add much value in keeping this in regression tests. -- With Regards, Amit Kapila.
Commits
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Doc: Generated column replication.
- 6252b1eaf82b 18.0 landed
-
Rename pubgencols_type to pubgencols in pg_publication.
- 75eb9766ec20 18.0 landed
-
Doc: Fix column name in pg_publication catalog.
- 117f9f328e0f 18.0 landed
-
Fix buildfarm failure introduced by commit e65dbc9927.
- b35434b134b1 18.0 landed
-
Change publication's publish_generated_columns option type to enum.
- e65dbc9927fb 18.0 landed
-
Fix \dRp+ output when describing publications with a lower server version.
- 991974bb4888 18.0 landed
-
Replicate generated columns when 'publish_generated_columns' is set.
- 7054186c4ebe 18.0 landed
-
Doc: Update the behavior of generated columns in Logical Replication.
- 5b0c46ea0932 18.0 landed
-
Replicate generated columns when specified in the column list.
- 745217a051a9 18.0 landed
-
Doc: Generated columns are skipped for logical replication.
- 7a089f6e6a14 17.0 cited