pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Amit Kapila <akapila@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix double publish of child table's data.
Date: Thu, 09 Dec 2021 03:40:24 +0000
Message-ID: <E1mvAIC-0002A8-M7@gemulon.postgresql.org> (raw)

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(-)



view thread (3+ messages)  latest in thread

Message-ID: <E1mvAIC-0002A8-M7@gemulon.postgresql.org>
Permalink:  ../E1mvAIC-0002A8-M7@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1mvAIC-0002A8-M7@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: akapila@postgresql.org
  Subject: Re: pgsql: Fix double publish of child table's data.
  In-Reply-To: <E1mvAIC-0002A8-M7@gemulon.postgresql.org>
  References: <E1mvAIC-0002A8-M7@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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