From: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Support adding partitioned tables to publication |
Date: | 2020-03-10 08:13:09 |
Message-ID: | E1jBa0j-0005mh-8X@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
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(at)gmail(dot)com>
Reviewed-by: Rafia Sabih <rafia(dot)pghackers(at)gmail(dot)com>
Reviewed-by: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Discussion: https://www.postgresql.org/message-id/flat/CA+HiwqH=Y85vRK3mOdjEkqFK+E=ST=eQiHdpj43L=_eJMOOznQ(at)mail(dot)gmail(dot)com
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(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2020-03-10 09:35:19 | pgsql: Remove utils/acl.h from catalog/objectaddress.h |
Previous Message | Michael Paquier | 2020-03-10 06:41:51 | pgsql: Prevent reindex of invalid indexes on TOAST tables |