mirror of
https://github.com/postgres/postgres.git
synced 2025-09-03 15:22:11 +03:00
Revert "Use a bitmask to represent role attributes"
This reverts commit 1826987a46
.
The overall design was deemed unacceptable, in discussion following the
previous commit message; we might find some parts of it still
salvageable, but I don't want to be on the hook for fixing it, so let's
wait until we have a new patch.
This commit is contained in:
@@ -20,14 +20,13 @@
|
||||
#include "replication/slot.h"
|
||||
#include "replication/logical.h"
|
||||
#include "replication/logicalfuncs.h"
|
||||
#include "utils/acl.h"
|
||||
#include "utils/builtins.h"
|
||||
#include "utils/pg_lsn.h"
|
||||
|
||||
static void
|
||||
check_permissions(void)
|
||||
{
|
||||
if (!have_role_attribute(ROLE_ATTR_REPLICATION))
|
||||
if (!superuser() && !has_rolreplication(GetUserId()))
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
|
||||
(errmsg("must be superuser or replication role to use replication slots"))));
|
||||
|
Reference in New Issue
Block a user