mirror of
https://github.com/postgres/postgres.git
synced 2025-06-30 21:42:05 +03:00
Use a bitmask to represent role attributes
The previous representation using a boolean column for each attribute would not scale as well as we want to add further attributes. Extra auxilliary functions are added to go along with this change, to make up for the lost convenience of access of the old representation. Catalog version bumped due to change in catalogs and the new functions. Author: Adam Brightwell, minor tweaks by Álvaro Reviewed by: Stephen Frost, Andres Freund, Álvaro Herrera
This commit is contained in:
@ -762,7 +762,7 @@ InitPostgres(const char *in_dbname, Oid dboid, const char *username,
|
||||
{
|
||||
Assert(!bootstrap);
|
||||
|
||||
if (!superuser() && !has_rolreplication(GetUserId()))
|
||||
if (!have_role_attribute(ROLE_ATTR_REPLICATION))
|
||||
ereport(FATAL,
|
||||
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
|
||||
errmsg("must be superuser or replication role to start walsender")));
|
||||
|
Reference in New Issue
Block a user