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 <[email protected]> Reviewed-by: Rafia Sabih <[email protected]> Reviewed-by: Peter Eisentraut <[email protected]> Reviewed-by: Petr Jelinek <[email protected]> Discussion: https://www.postgresql.org/message-id/flat/CA+HiwqH=Y85vRK3mOdjEkqFK+E=ST=eQiHdpj43L=_ejmoo...@mail.gmail.com 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(-)
