summaryrefslogtreecommitdiff
path: root/src/include/replication/logicalrelation.h
diff options
context:
space:
mode:
authorAmit Kapila <akapila@postgresql.org>2022-06-16 08:24:22 +0530
committerAmit Kapila <akapila@postgresql.org>2022-06-16 08:24:22 +0530
commit1f9a7738eb84f341a9b39689f33c887d1ef39487 (patch)
tree7096227cd9132ef6f223c091c0192d78f62b2b08 /src/include/replication/logicalrelation.h
parent16f5a8da76f21576987790df828082cb7bb1bdad (diff)
Fix data inconsistency between publisher and subscriber.
We were not updating the partition map cache in the subscriber even when the corresponding remote rel is changed. Due to this data was getting incorrectly replicated for partition tables after the publisher has changed the table schema. Fix it by resetting the required entries in the partition map cache after receiving a new relation mapping from the publisher. Reported-by: Shi Yu Author: Shi Yu, Hou Zhijie Reviewed-by: Amit Langote, Amit Kapila Backpatch-through: 13, where it was introduced Discussion: https://postgr.es/m/OSZPR01MB6310F46CD425A967E4AEF736FDA49@OSZPR01MB6310.jpnprd01.prod.outlook.com
Diffstat (limited to 'src/include/replication/logicalrelation.h')
-rw-r--r--src/include/replication/logicalrelation.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/include/replication/logicalrelation.h b/src/include/replication/logicalrelation.h
index e369b27e7f5..847e6f18465 100644
--- a/src/include/replication/logicalrelation.h
+++ b/src/include/replication/logicalrelation.h
@@ -33,6 +33,7 @@ typedef struct LogicalRepRelMapEntry
} LogicalRepRelMapEntry;
extern void logicalrep_relmap_update(LogicalRepRelation *remoterel);
+extern void logicalrep_partmap_reset_relmap(LogicalRepRelation *remoterel);
extern LogicalRepRelMapEntry *logicalrep_rel_open(LogicalRepRelId remoteid,
LOCKMODE lockmode);