Re: Dropped and generated columns might cause wrong data on subs when REPLICA IDENTITY FULL

From: Önder Kalacı <onderkalaci(at)gmail(dot)com>
To: "shiy(dot)fnst(at)fujitsu(dot)com" <shiy(dot)fnst(at)fujitsu(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Dropped and generated columns might cause wrong data on subs when REPLICA IDENTITY FULL
Date: 2023-03-17 15:28:46
Message-ID: CACawEhUAW2Jiwo3xwYSoB0rfjuWMtYhS_X+ZVHWXZBysjKPXKg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Shi Yu,

Thanks for the review, really appreciate it!

> I couldn't apply
> v2-0001-Ignore-dropped-columns-HEAD-REL_15-REL_14-REL_13.patch
> cleanly in v13 and v14. It looks the patch needs some changes in these
> versions.
>
>

> ```
> Checking patch src/backend/executor/execReplication.c...
> Hunk #1 succeeded at 243 (offset -46 lines).
> Hunk #2 succeeded at 263 (offset -46 lines).
> Checking patch src/test/subscription/t/100_bugs.pl...
> error: while searching for:
> $node_publisher->stop('fast');
> $node_subscriber->stop('fast');
>
> done_testing();
>
> error: patch failed: src/test/subscription/t/100_bugs.pl:373
> Applied patch src/backend/executor/execReplication.c cleanly.
> Applying patch src/test/subscription/t/100_bugs.pl with 1 reject...
> Rejected hunk #1.
> ```
>
>
Hmm, interesting, it behaves differently on Macos and linux. Now attaching
new patches that should apply. Can you please try?

Besides, I tried v2-0001-Ignore-dropped-columns-REL_12-REL_11.patch in v12.
> The
> test failed and here's some information.
>
> ```
> Can't locate object method "new" via package "PostgreSQL::Test::Cluster"
> (perhaps you forgot to load "PostgreSQL::Test::Cluster"?) at t/100_bugs.pl
> line 74.
> # Looks like your test exited with 2 just after 1.
> ```
>
> +my $node_publisher_d_cols =
> PostgreSQL::Test::Cluster->new('node_publisher_d_cols');
>
> It seems this usage is not supported in v12 and we should use
> get_new_node()
> like other test cases.
>
>
Thanks for sharing. Fixed

This time I was able to run all the tests with all the patches applied.

Again, the generated column fix also has some minor differences
per version. So, overall we have 6 patches with very minor
differences :)

Thanks,
Onder

Attachment Content-Type Size
v3-0001-Ignore-dropped-columns-REL_11.patch application/octet-stream 4.0 KB
v3-0001-Ignore-dropped-columns-REL_12.patch application/octet-stream 4.0 KB
v3-0001-Ignore-dropped-columns-REL_13-REL_14.patch application/octet-stream 3.7 KB
v3-0001-Ignore-generated-columns-HEAD-REL_15.patch application/octet-stream 2.9 KB
v3-0001-Ignore-generated-columns-REL_14-REL_13.patch application/octet-stream 3.1 KB
v3-0001-Ignore-generated-columns-REL_12.patch application/octet-stream 3.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Zheng Li 2023-03-17 15:40:56 Re: Support logical replication of DDLs
Previous Message Ranier Vilela 2023-03-17 15:19:56 Re: Avoid use deprecated Windows Memory API