pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Support adding partitioned tables to publication
Date: Tue, 10 Mar 2020 08:13:09 +0000
Message-ID: <E1jBa0j-0005mh-8X@gemulon.postgresql.org> (raw)

Support adding partitioned tables to publication

When a partitioned table is added to a publication, changes of all of
its partitions (current or future) are published via that publication.

This change only affects which tables a publication considers as its
members.  The receiving side still sees the data coming from the
individual leaf partitions.  So existing restrictions that partition
hierarchies can only be replicated one-to-one are not changed by this.

Author: Amit Langote <amitlangote09@gmail.com>
Reviewed-by: Rafia Sabih <rafia.pghackers@gmail.com>
Reviewed-by: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Discussion: https://www.postgresql.org/message-id/flat/CA+HiwqH=Y85vRK3mOdjEkqFK+E=ST=eQiHdpj43L=_eJMOOznQ@mail....

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/17b9e7f9fe238eeb5f6b40061b444ebf28d9e06f

Modified Files
--------------
doc/src/sgml/logical-replication.sgml       |  17 +--
doc/src/sgml/ref/create_publication.sgml    |  19 ++-
src/backend/catalog/pg_publication.c        |  85 ++++++++++---
src/backend/commands/publicationcmds.c      |  23 +++-
src/backend/replication/logical/tablesync.c |   1 +
src/backend/replication/pgoutput/pgoutput.c |  19 ++-
src/bin/pg_dump/pg_dump.c                   |   8 +-
src/include/catalog/pg_publication.h        |  19 ++-
src/test/regress/expected/publication.out   |  34 +++++-
src/test/regress/sql/publication.sql        |  23 +++-
src/test/subscription/t/013_partition.pl    | 178 ++++++++++++++++++++++++++++
11 files changed, 382 insertions(+), 44 deletions(-)



Message-ID: <E1jBa0j-0005mh-8X@gemulon.postgresql.org>
Permalink:  ../E1jBa0j-0005mh-8X@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1jBa0j-0005mh-8X@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: peter@eisentraut.org
  Subject: Re: pgsql: Support adding partitioned tables to publication
  In-Reply-To: <E1jBa0j-0005mh-8X@gemulon.postgresql.org>
  References: <E1jBa0j-0005mh-8X@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