Skip to content

Improve the SQL tab-completion feature for resource group#1669

Merged
reshke merged 2 commits intoapache:mainfrom
fairyfar:res-tab
Apr 9, 2026
Merged

Improve the SQL tab-completion feature for resource group#1669
reshke merged 2 commits intoapache:mainfrom
fairyfar:res-tab

Conversation

@fairyfar
Copy link
Copy Markdown
Contributor

@fairyfar fairyfar commented Apr 9, 2026

What does this PR do?

Improve the SQL tab-completion feature for resource group

When manually typing the SQL for resource group management in the psql client, the auto-completion(tab-completion) function is not complete enough.
In particular, the auto-completion of the ALTER RESOURCE GROUP command is lacking.

For example, auto-completion cannot continue after "ALTER RESOURCE ".

Key points of modification:

  1. For the time being, we will not handle the tab-completion feature of resource queue because there is a trend for resource group to replace resource queue.
  2. Correct the description of the gp_resource_manager parameter.

Type of Change

  • Bug fix (non-breaking change)
  • New feature (non-breaking change)
  • Breaking change (fix or feature with breaking changes)
  • Documentation update

Breaking Changes

Test Plan

  • Unit tests added/updated
  • Integration tests added/updated
  • Passed make installcheck
  • Passed make -C src/test installcheck-cbdb-parallel

Impact

Performance:

User-facing changes:

Dependencies:

Checklist

Additional Context

CI Skip Instructions


1. For the time being, we will not handle the tab-completion feature of resource queue because there is a trend for resource group to replace resource queue.
2. Correct the description of the gp_resource_manager parameter.
Copy link
Copy Markdown
Contributor

@my-ship-it my-ship-it left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Clean, focused fix that addresses a real usability gap.
Only suggestion: confirm group-v2 is already a supported gp_resource_manager value.

Copy link
Copy Markdown
Contributor

@leborchuk leborchuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, here https://github.com/apache/cloudberry/blob/main/src/backend/cdb/cdbvars.c#L526 we check if gp_resource_manager could one of 3 supported items, not 2 as was in previous help string

Also here the set of resource group grama and options https://github.com/apache/cloudberry/blob/main/src/backend/parser/gram.y#L1752 - SQL syntax was correctly reflected in a tab completion and options are the same as in a gram.y

LGTM

@reshke reshke merged commit 0efd878 into apache:main Apr 9, 2026
43 checks passed
@fairyfar
Copy link
Copy Markdown
Contributor Author

fairyfar commented Apr 9, 2026

LGTM Clean, focused fix that addresses a real usability gap. Only suggestion: confirm group-v2 is already a supported gp_resource_manager value.

Sorry to reply you later.
Yes, group-v2 is supported.
Now, "group-v2" parameter value was used in CI test job "ic-resgroup-v2".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants