]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix data inconsistency between publisher and subscriber.
authorAmit Kapila <akapila@postgresql.org>
Thu, 16 Jun 2022 03:02:10 +0000 (08:32 +0530)
committerAmit Kapila <akapila@postgresql.org>
Thu, 16 Jun 2022 03:02:10 +0000 (08:32 +0530)
commit0980adfd4d021e3329bf41452ce1a1210321974f
tree2d8b140d999463fe6afa1acc38d9869f84adb7e4
parentd457cb4e8a5e25fe16420cb91cb8450d8fca49d3
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
src/backend/replication/logical/relation.c
src/backend/replication/logical/worker.c
src/include/replication/logicalrelation.h
src/test/subscription/t/013_partition.pl