Fix a WARNING for data origin discrepancies.
authorAmit Kapila
Fri, 21 Feb 2025 09:04:40 +0000 (14:34 +0530)
committerAmit Kapila
Fri, 21 Feb 2025 09:04:40 +0000 (14:34 +0530)
commitb4e0d0c53fabe7d19b6a081d6c2b98aa4df55295
treedd22eb8609b20d3ff417d2ee3ba96482c22e5e57
parent984410b923263cac901fa81e0efbe523e9c36df3
Fix a WARNING for data origin discrepancies.

Previously, a WARNING was issued at the time of defining a subscription
with origin=NONE only when the publisher subscribed to the same table from
other publishers, indicating potential data origination from different
origins. However, the publisher can subscribe to the partition ancestors
or partition children of the table from other publishers, which could also
result in mixed-origin data inclusion. So, give a WARNING in those cases
as well.

Reported-by: Sergey Tatarintsev
Author: Hou Zhijie 
Author: Shlok Kyal 
Reviewed-by: Vignesh C
Reviewed-by: Amit Kapila
Backpatch-through: 16, where it was introduced
Discussion: https://postgr.es/m/5eda6a9c-63cf-404d-8a49-8dcb116a29f3@postgrespro.ru
doc/src/sgml/ref/create_subscription.sgml
src/backend/commands/subscriptioncmds.c
src/test/subscription/t/030_origin.pl