From 17b9e7f9fe238eeb5f6b40061b444ebf28d9e06f Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Tue, 10 Mar 2020 08:42:59 +0100 Subject: 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 Reviewed-by: Rafia Sabih Reviewed-by: Peter Eisentraut Discussion: https://www.postgresql.org/message-id/flat/CA+HiwqH=Y85vRK3mOdjEkqFK+E=ST=eQiHdpj43L=_eJMOOznQ@mail.gmail.com --- src/backend/replication/logical/tablesync.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/backend/replication/logical/tablesync.c') diff --git a/src/backend/replication/logical/tablesync.c b/src/backend/replication/logical/tablesync.c index f8183cd488c..98825f01e98 100644 --- a/src/backend/replication/logical/tablesync.c +++ b/src/backend/replication/logical/tablesync.c @@ -761,6 +761,7 @@ copy_table(Relation rel) /* Map the publisher relation to local one. */ relmapentry = logicalrep_rel_open(lrel.remoteid, NoLock); Assert(rel == relmapentry->localrel); + Assert(relmapentry->localrel->rd_rel->relkind == RELKIND_RELATION); /* Start copy on the publisher. */ initStringInfo(&cmd); -- cgit v1.2.3