pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix double publish of child table's data. 3+ messages / 1 participants [nested] [flat]
* pgsql: Fix double publish of child table's data. @ 2021-12-09 03:40 Amit Kapila <akapila@postgresql.org> 0 siblings, 0 replies; 3+ messages in thread From: Amit Kapila @ 2021-12-09 03:40 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/5e97905a2c764d4ca36f5c6cccd0ebbf157b9df4 Modified Files -------------- src/backend/catalog/pg_publication.c | 41 +++++++++++-------------------- src/test/regress/expected/publication.out | 8 ++++++ src/test/regress/sql/publication.sql | 4 +++ src/test/subscription/t/013_partition.pl | 18 +++++++++++--- 4 files changed, 40 insertions(+), 31 deletions(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: Fix double publish of child table's data. @ 2021-12-09 03:40 Amit Kapila <akapila@postgresql.org> 0 siblings, 0 replies; 3+ messages in thread From: Amit Kapila @ 2021-12-09 03:40 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/614b77d65a3859ad8d2c1c28475e98ddee06dc50 Modified Files -------------- src/backend/catalog/pg_publication.c | 52 +++++++++++++++++++++++++++++++ src/test/regress/expected/publication.out | 9 ++++++ src/test/regress/sql/publication.sql | 4 +++ src/test/subscription/t/013_partition.pl | 18 ++++++++--- 4 files changed, 79 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: Fix double publish of child table's data. @ 2021-12-09 03:40 Amit Kapila <akapila@postgresql.org> 0 siblings, 0 replies; 3+ messages in thread From: Amit Kapila @ 2021-12-09 03:40 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/3f06c00cf6dcd838b61c5d452d4908b5b6e17762 Modified Files -------------- src/backend/catalog/pg_publication.c | 52 +++++++++++++++++++++++++++++++ src/test/regress/expected/publication.out | 9 ++++++ src/test/regress/sql/publication.sql | 4 +++ src/test/subscription/t/013_partition.pl | 18 ++++++++--- 4 files changed, 79 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2021-12-09 03:40 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2021-12-09 03:40 pgsql: Fix double publish of child table's data. Amit Kapila <akapila@postgresql.org> 2021-12-09 03:40 pgsql: Fix double publish of child table's data. Amit Kapila <akapila@postgresql.org> 2021-12-09 03:40 pgsql: Fix double publish of child table's data. Amit Kapila <akapila@postgresql.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox