diff --git a/src/backend/executor/execReplication.c b/src/backend/executor/execReplication.c index 5bd3bbc35e..095f3be54d 100644 --- a/src/backend/executor/execReplication.c +++ b/src/backend/executor/execReplication.c @@ -608,6 +608,14 @@ void CheckSubscriptionRelkind(char relkind, const char *nspname, const char *relname) { + /* Give more specific error for partitioned tables */ + if (relkind == RELKIND_PARTITIONED_TABLE) + ereport(ERROR, + (errcode(ERRCODE_WRONG_OBJECT_TYPE), + errmsg("\"%s.%s\" is a partitioned table", + nspname, relname), + errdetail("Partitioned tables are not supported as logical replication targets"))); + /* * We currently only support writing to regular tables. */