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: Allow publishing partition changes via ancestors
Date: Wed, 08 Apr 2020 09:23:41 +0000
Message-ID: <E1jM6vt-00065f-GB@gemulon.postgresql.org> (raw)

Allow publishing partition changes via ancestors

To control whether partition changes are replicated using their own
identity and schema or an ancestor's, add a new parameter that can be
set per publication named 'publish_via_partition_root'.

This allows replicating a partitioned table into a different partition
structure on the subscriber.

Author: Amit Langote <amitlangote09@gmail.com>
Reviewed-by: Rafia Sabih <rafia.pghackers@gmail.com>
Reviewed-by: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Reviewed-by: Petr Jelinek <petr@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/83fd4532a72179c370e318075a10e0e2aa832024

Modified Files
--------------
doc/src/sgml/catalogs.sgml                  |  10 +
doc/src/sgml/logical-replication.sgml       |  12 +-
doc/src/sgml/ref/create_publication.sgml    |  20 ++
src/backend/catalog/pg_publication.c        |  70 +++----
src/backend/commands/publicationcmds.c      |  95 +++++----
src/backend/replication/pgoutput/pgoutput.c | 223 +++++++++++++++++----
src/backend/utils/cache/relcache.c          |  15 ++
src/bin/pg_dump/pg_dump.c                   |  24 ++-
src/bin/pg_dump/pg_dump.h                   |   1 +
src/bin/psql/describe.c                     |  17 +-
src/include/catalog/catversion.h            |   2 +-
src/include/catalog/pg_publication.h        |   5 +-
src/test/regress/expected/publication.out   | 103 +++++-----
src/test/regress/sql/publication.sql        |   3 +
src/test/subscription/t/013_partition.pl    | 298 +++++++++++++++++++++++++++-
15 files changed, 724 insertions(+), 174 deletions(-)



view thread (3+ messages)  latest in thread

Message-ID: <E1jM6vt-00065f-GB@gemulon.postgresql.org>
Permalink:  ../E1jM6vt-00065f-GB@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1jM6vt-00065f-GB@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: Allow publishing partition changes via ancestors
  In-Reply-To: <E1jM6vt-00065f-GB@gemulon.postgresql.org>
  References: <E1jM6vt-00065f-GB@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