Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 0a49c95

Browse files
committed
Avoid incorrectly granting replication to roles created with NOSUPERUSER.
Andres Freund
1 parent 40e6401 commit 0a49c95

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/commands/user.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ CreateRole(CreateRoleStmt *stmt)
245245
* Superusers get replication by default, but only if NOREPLICATION
246246
* wasn't explicitly mentioned
247247
*/
248-
if (!(disreplication && intVal(disreplication->arg) == 0))
248+
if (issuper && !(disreplication && intVal(disreplication->arg) == 0))
249249
isreplication = 1;
250250
}
251251
if (dinherit)

0 commit comments

Comments
 (0)