Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher
Önder Kalacı <onderkalaci@gmail.com>
From: Önder Kalacı <onderkalaci@gmail.com>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: vignesh C <vignesh21@gmail.com>,
"shiy.fnst@fujitsu.com" <shiy.fnst@fujitsu.com>, "wangw.fnst@fujitsu.com" <wangw.fnst@fujitsu.com>,
Marco Slot <marco.slot@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, Andres Freund <andres@anarazel.de>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2023-03-11T20:04:26Z
Lists: pgsql-hackers
Hi Amit, all > > This triggers tuples_equal to fail. To fix that, I improved the > tuples_equal > > such that it skips the dropped columns. > > > > By any chance, have you tried with generated columns? Yes, it shows the same behavior. > See > logicalrep_write_tuple()/logicalrep_write_attrs() where we neither > send anything for dropped columns nor for generated columns. Similarly, on receiving side, in logicalrep_rel_open() and > slot_store_data(), we seem to be using NULL for such columns. > > Thanks for the explanation, it helps a lot. > > Yes, it would be better to report and discuss this in a separate thread, > Done via [1] > > > Attached as v40_0001 on the patch. > > > > Note that I need to have that commit as 0001 so that 0002 patch > > passes the tests. > > > > I think we can add such a test (which relies on existing buggy > behavior) later after fixing the existing bug. For now, it would be > better to remove that test and add it after we fix dropped columns > issue in HEAD. > Alright, when I push the next version (hopefully tomorrow), I'll follow this suggestion. Thanks, Onder KALACI [1] https://www.postgresql.org/message-id/CACawEhVQC9WoofunvXg12aXtbqKnEgWxoRx3%2Bv8q32AWYsdpGg%40mail.gmail.com
Commits
-
Add the testcases for 89e46da5e5.
- 805b821e77a3 16.0 landed
-
Allow the use of indexes other than PK and REPLICA IDENTITY on the subscriber.
- 89e46da5e511 16.0 landed
-
Rework query relation permission checking
- a61b1f74823c 16.0 cited
-
Generalize ri_RootToPartitionMap to use for non-partition children
- fb958b5da86d 16.0 cited
-
Add wait_for_subscription_sync for TAP tests.
- 0c20dd33db16 16.0 cited
-
Logical replication
- 665d1fad99e7 10.0 cited