diff --git a/src/backend/commands/publicationcmds.c b/src/backend/commands/publicationcmds.c index 464edf166cd..a618ac5c7b2 100644 --- a/src/backend/commands/publicationcmds.c +++ b/src/backend/commands/publicationcmds.c @@ -732,7 +732,7 @@ static bool is_neon_superuser(void) { Oid neon_superuser_oid = get_role_oid("neon_superuser", true /*missing_ok*/); - return neon_superuser_oid != InvalidOid && has_privs_of_role(GetCurrentRoleId(), neon_superuser_oid); + return neon_superuser_oid != InvalidOid && has_privs_of_role(GetUserId(), neon_superuser_oid); } /*