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

Support configuration parameters handling #143

Merged
merged 15 commits into from
Mar 22, 2024
Merged

Support configuration parameters handling #143

merged 15 commits into from
Mar 22, 2024

Conversation

jennifersp
Copy link
Contributor

@jennifersp jennifersp commented Mar 7, 2024

This PR includes changes for:

  • The complete list of configuration parameters is in.
  • All of the postgres configuration parameters will be added to existing system variables list in GMS. There are two parameters that have the same name as mysql system variables, which will be overwritten by the postgres parameter. This is temporary until we completely separate the use of them.
  • Current implementation of sql.SystemVariableRegistry interface is for Dolt only, but we add all the postgres configuration parameters to the SystemVariables global variable in GMS. This should be updated to handle Doltgres config parameters separately in future.
  • The default and only supported scope of postgres parameters is SESSION, which is used as SESSION scope in GMS. There is no GLOBAL scope in postgres to be set during a session.

Depends on GMS PR: dolthub/go-mysql-server#2375
Depends on Dolt PR: dolthub/dolt#7579

Next up:

  • need more support for Parameter such as accept setting memory and time values that has unit information, etc.
  • need privileges and role checking for specific parameters.
  • support setting parameter defaults from configuration file.
  • `LOCAL scope support.

@jennifersp jennifersp marked this pull request as ready for review March 14, 2024 22:44
@jennifersp jennifersp requested a review from Hydrocharged March 14, 2024 22:44
Copy link
Collaborator

@Hydrocharged Hydrocharged left a comment

Choose a reason for hiding this comment

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

Overall looks good! Great work!

postgres/parser/sem/tree/var_name.go Outdated Show resolved Hide resolved
testing/go/set_test.go Outdated Show resolved Hide resolved
testing/go/set_test.go Show resolved Hide resolved
server/server.go Show resolved Hide resolved
server/config/parameters.go Outdated Show resolved Hide resolved
server/config/parameters.go Outdated Show resolved Hide resolved
server/config/parameters.go Outdated Show resolved Hide resolved
server/ast/set_var.go Outdated Show resolved Hide resolved
server/expression/set.go Outdated Show resolved Hide resolved
@jennifersp jennifersp requested a review from Hydrocharged March 21, 2024 18:35
Copy link
Collaborator

@Hydrocharged Hydrocharged left a comment

Choose a reason for hiding this comment

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

LGTM! Great work!

server/config/parameters.go Show resolved Hide resolved
@jennifersp jennifersp merged commit 4e72741 into main Mar 22, 2024
8 checks passed
@jennifersp jennifersp deleted the jennifer/set branch March 22, 2024 18:54
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.

2 participants