pgsql: Invalidate relcache when changing REPLICA IDENTITY index.

From: Amit Kapila <akapila(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Invalidate relcache when changing REPLICA IDENTITY index.
Date: 2021-11-16 04:28:50
Message-ID: E1mmq5S-0003RG-Do@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/354a1f8d220fbbb07b0ded32c5ade72646afb801

Modified Files
--------------
src/backend/commands/tablecmds.c | 6 +++
src/test/subscription/t/100_bugs.pl | 84 ++++++++++++++++++++++++++++++++++++-
2 files changed, 89 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2021-11-16 14:53:53 pgsql: Move InitXLogInsert() call from InitXLOGAccess() to BaseInit().
Previous Message Robert Haas 2021-11-15 19:26:45 pgsql: Fix thinko in bbsink_throttle_manifest_contents.