Allow publishing partition changes via ancestors
Peter Eisentraut <peter@eisentraut.org>
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.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/catalogs.sgml | modified | +10 −0 |
| doc/src/sgml/logical-replication.sgml | modified | +8 −4 |
| doc/src/sgml/ref/create_publication.sgml | modified | +20 −0 |
| src/backend/catalog/pg_publication.c | modified | +35 −35 |
| src/backend/commands/publicationcmds.c | modified | +56 −39 |
| src/backend/replication/pgoutput/pgoutput.c | modified | +182 −41 |
| src/backend/utils/cache/relcache.c | modified | +15 −0 |
| src/bin/pg_dump/pg_dump.c | modified | +20 −4 |
| src/bin/pg_dump/pg_dump.h | modified | +1 −0 |
| src/bin/psql/describe.c | modified | +16 −1 |
| src/include/catalog/catversion.h | modified | +1 −1 |
| src/include/catalog/pg_publication.h | modified | +4 −1 |
| src/test/regress/expected/publication.out | modified | +57 −46 |
| src/test/regress/sql/publication.sql | modified | +3 −0 |
| src/test/subscription/t/013_partition.pl | modified | +296 −2 |
Documentation touched
Discussion
- adding partitioned tables to publications 81 messages · 2019-10-07 → 2020-04-17