From: Robert Haas Date: Wed, 13 Apr 2011 19:26:51 +0000 (-0700) Subject: Avoid incorrectly granting replication to roles created with NOSUPERUSER. X-Git-Tag: REL9_1_BETA1~101 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0a49c95c734d58385e9c5e335088da1cd54e2344;p=postgresql Avoid incorrectly granting replication to roles created with NOSUPERUSER. Andres Freund --- 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)