Support adding partitioned tables to publication
authorPeter Eisentraut <peter@eisentraut.org>
Tue, 10 Mar 2020 07:42:59 +0000 (08:42 +0100)
committerPeter Eisentraut <peter@eisentraut.org>
Tue, 10 Mar 2020 08:09:32 +0000 (09:09 +0100)
commit17b9e7f9fe238eeb5f6b40061b444ebf28d9e06f
tree7c6f8d87b72708aeeb5f800ec6384cc19c927b63
parent61d7c7bce3686ec02bd64abac742dd35ed9b9b01
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.gmail.com
doc/src/sgml/logical-replication.sgml
doc/src/sgml/ref/create_publication.sgml
src/backend/catalog/pg_publication.c
src/backend/commands/publicationcmds.c
src/backend/replication/logical/tablesync.c
src/backend/replication/pgoutput/pgoutput.c
src/bin/pg_dump/pg_dump.c
src/include/catalog/pg_publication.h
src/test/regress/expected/publication.out
src/test/regress/sql/publication.sql
src/test/subscription/t/013_partition.pl [new file with mode: 0644]