Re: Pgoutput not capturing the generated columns - Mailing list pgsql-hackers

From Peter Smith
Subject Re: Pgoutput not capturing the generated columns
Date
Msg-id CAHut+PsNcV6oR0WYmADWj6ROyN_Bcz-nNVz7rWZzK5bV6FiZZg@mail.gmail.com
Whole thread Raw
In response to Re: Pgoutput not capturing the generated columns  (Amit Kapila <amit.kapila16@gmail.com>)
Responses Re: Pgoutput not capturing the generated columns
List pgsql-hackers
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.

======
Kind Regards,
Peter Smith.
Fujitsu Australia



pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: Fix for consume_xids advancing XIDs incorrectly
Next
From: Jehan-Guillaume de Rorthais
Date:
Subject: Re: [BUG] Fix DETACH with FK pointing to a partitioned table fails