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

Lines changed: 1 addition & 1 deletion
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy