Invalidate relcache when changing REPLICA IDENTITY index.
authorAmit Kapila <akapila@postgresql.org>
Tue, 16 Nov 2021 02:40:13 +0000 (08:10 +0530)
committerAmit Kapila <akapila@postgresql.org>
Tue, 16 Nov 2021 02:40:13 +0000 (08:10 +0530)
commit354a1f8d220fbbb07b0ded32c5ade72646afb801
treea949daff73b46c68927a31beaa21aaaa23f93e1b
parent1b098da2009362e0e8d9a1d0a6aac2f2bd3e2f0b
Invalidate relcache when changing REPLICA IDENTITY index.

When changing REPLICA IDENTITY INDEX to another one, the target table's
relcache was not being invalidated. This leads to skipping update/delete
operations during apply on the subscriber side as the columns required to
search corresponding rows won't get logged.

Author: Tang Haiying, Hou Zhijie
Reviewed-by: Euler Taveira, Amit Kapila
Backpatch-through: 10
Discussion: https://postgr.es/m/OS0PR01MB61133CA11630DAE45BC6AD95FB939@OS0PR01MB6113.jpnprd01.prod.outlook.com
src/backend/commands/tablecmds.c
src/test/subscription/t/100_bugs.pl