]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix double publish of child table's data.
authorAmit Kapila <akapila@postgresql.org>
Thu, 9 Dec 2021 03:30:35 +0000 (09:00 +0530)
committerAmit Kapila <akapila@postgresql.org>
Thu, 9 Dec 2021 03:30:35 +0000 (09:00 +0530)
commit3f06c00cf6dcd838b61c5d452d4908b5b6e17762
treee607d195ccdedf151a8baa776b5968592337feff
parenta96a1d656274d3e1ca7cd4c34b7ba79a2754b71d
Fix double publish of child table's data.

We publish the child table's data twice for a publication that has both
child and parent tables and is published with publish_via_partition_root
as true. This happens because subscribers will initiate synchronization
using both parent and child tables, since it gets both as separate tables
in the initial table list.

Ensure that pg_publication_tables returns only parent tables in such
cases.

Author: Hou Zhijie
Reviewed-by: Greg Nancarrow, Amit Langote, Vignesh C, Amit Kapila
Backpatch-through: 13
Discussion: https://postgr.es/m/OS0PR01MB57167F45D481F78CDC5986F794B99@OS0PR01MB5716.jpnprd01.prod.outlook.com
src/backend/catalog/pg_publication.c
src/test/regress/expected/publication.out
src/test/regress/sql/publication.sql
src/test/subscription/t/013_partition.pl