diff --git a/src/backend/commands/publicationcmds.c b/src/backend/commands/publicationcmds.c index a618ac5c7b2..faa4de7d1cf 100644 --- a/src/backend/commands/publicationcmds.c +++ b/src/backend/commands/publicationcmds.c @@ -765,7 +765,7 @@ CreatePublication(ParseState *pstate, CreatePublicationStmt *stmt) if (stmt->for_all_tables && !superuser() && !is_neon_superuser()) ereport(ERROR, (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), - errmsg("must be superuser to create FOR ALL TABLES publication"))); + errmsg("must be superuser or have privileges of neon_superuser to create FOR ALL TABLES publication"))); rel = table_open(PublicationRelationId, RowExclusiveLock); @@ -836,7 +836,7 @@ CreatePublication(ParseState *pstate, CreatePublicationStmt *stmt) if (schemaidlist != NIL && !superuser() && !is_neon_superuser()) ereport(ERROR, errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), - errmsg("must be superuser to create FOR TABLES IN SCHEMA publication")); + errmsg("must be superuser or have privileges of neon_superuser to create FOR TABLES IN SCHEMA publication")); if (relations != NIL) {