Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL functions for GreptimeDB administration #2921

Closed
5 tasks done
killme2008 opened this issue Dec 12, 2023 · 2 comments
Closed
5 tasks done

SQL functions for GreptimeDB administration #2921

killme2008 opened this issue Dec 12, 2023 · 2 comments
Labels
C-feature Category Features help wanted Extra attention is needed tracking-issue A tracking issue for a feature.
Milestone

Comments

@killme2008
Copy link
Contributor

killme2008 commented Dec 12, 2023

What problem does the new feature solve?

We need more functions to query info or do some management jobs in the GreptimeDB. We don't want to add many HTTP APIs for management but just add new SQL functions, because all these functions can be called via select function_xxx() through HTTP /sql API or MySQL/Postgres protocols.

Query functions

Management

What does the feature do?

Add functions to query info or do some management jobs in the GreptimeDB

Implementation challenges

No response

@killme2008 killme2008 added help wanted Extra attention is needed tracking-issue A tracking issue for a feature. C-feature Category Features Size: M labels Dec 12, 2023
@killme2008 killme2008 changed the title Some administrator/system functions for GreptimeDB administration SQL functions for GreptimeDB administration Dec 12, 2023
@sunng87
Copy link
Member

sunng87 commented Dec 13, 2023

While it's a good idea to use /sql instead of dedicated APIs, using functions for these information introduces issues with permission control.

I have a proposal to put those information behind query functions into information_schema tables. So we can take advantages of:

  1. Better permission control: Put these tables in information_schema of default catalog so we can protect it using catalog read/write permission rules.
  2. Query: We can use SQL filters and aggregators on data instead of individual functions for frontend/datanode

No idea for those management functions at the moment. But the final design must include permission control or resource isolation mechanism to prevent them from being called with crossing-tenant effect.

@killme2008
Copy link
Contributor Author

I have a proposal to put those information behind query functions into information_schema tables.

It's a good idea. We have to provide some scaffold function or structure and demo to help people who are interested in contributing these features.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature Category Features help wanted Extra attention is needed tracking-issue A tracking issue for a feature.
Projects
None yet
Development

No branches or pull requests

2 participants