Skip to content

Commit

Permalink
Revert "Only super user can set the GUC gp_resource_group_bypass."
Browse files Browse the repository at this point in the history
This reverts commit 85d943910c74b48e606515fc18a7d4a99e197dbc.

Bypass resgroup still will put proc into cgroup and use a small
value of query memory so it will not impact system too much. Revert
previous commit let other application like GPCC can work easily.
  • Loading branch information
kainwen authored and yjhjstz committed Jan 15, 2025
1 parent 658407e commit 7e5cb02
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 12 deletions.
2 changes: 1 addition & 1 deletion src/backend/utils/misc/guc_gp.c
Original file line number Diff line number Diff line change
Expand Up @@ -2839,7 +2839,7 @@ struct config_bool ConfigureNamesBool_gp[] =
},

{
{"gp_resource_group_bypass", PGC_SUSET, RESOURCES,
{"gp_resource_group_bypass", PGC_USERSET, RESOURCES,
gettext_noop("If the value is true, the query in this session will not be limited by resource group."),
NULL
},
Expand Down
6 changes: 0 additions & 6 deletions src/test/isolation2/expected/resgroup/resgroup_bypass.out
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@ SET ROLE role_bypass;
SET
CREATE TABLE t_bypass(a int) distributed by (a);
CREATE

-- gp_resource_group_bypass can only be set by super user
-- below set statement will error out
set gp_resource_group_bypass = 1;
ERROR: permission denied to set parameter "gp_resource_group_bypass"

RESET ROLE;
RESET

Expand Down
5 changes: 0 additions & 5 deletions src/test/isolation2/sql/resgroup/resgroup_bypass.sql
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ CREATE ROLE role_bypass RESOURCE GROUP rg_bypass;

SET ROLE role_bypass;
CREATE TABLE t_bypass(a int) distributed by (a);

-- gp_resource_group_bypass can only be set by super user
-- below set statement will error out
set gp_resource_group_bypass = 1;

RESET ROLE;

-- Session1: pure-catalog query will be unassigned and bypassed.
Expand Down

0 comments on commit 7e5cb02

Please sign in to comment.