diff --git a/src/backend/commands/user.c b/src/backend/commands/user.c index 9c9164d3bc..3f7d4992af 100644 --- a/src/backend/commands/user.c +++ b/src/backend/commands/user.c @@ -245,7 +245,7 @@ CreateRole(CreateRoleStmt *stmt) * Superusers get replication by default, but only if NOREPLICATION * wasn't explicitly mentioned */ - if (!(disreplication && intVal(disreplication->arg) == 0)) + if (issuper && !(disreplication && intVal(disreplication->arg) == 0)) isreplication = 1; } if (dinherit)