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

Fix max_statement_mem not enforced #745

Closed

Conversation

roseduan
Copy link
Contributor

@roseduan roseduan commented Dec 3, 2024

GUC statement_mem can not exceed the value of max_statement_mem.

Before change:

postgres=# set max_statement_mem to '500MB';
SET
postgres=# set statement_mem to '600MB';
SET

After change:

postgres=# set max_statement_mem to '500MB';
SET
postgres=# set statement_mem to '600MB';
ERROR:  Invalid input for statement_mem, must be less than
max_statement_mem (512000 kB)

Fixes #ISSUE_Number

What does this PR do?

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

⚠️ To skip CI: Add [skip ci] to your PR title. Only use when necessary! ⚠️


GUC statement_mem can not exceed the value of max_statement_mem.

Before change:
```
postgres=# set max_statement_mem to '500MB';
SET
postgres=# set statement_mem to '600MB';
SET
```

After change:
```
postgres=# set max_statement_mem to '500MB';
SET
postgres=# set statement_mem to '600MB';
ERROR:  Invalid input for statement_mem, must be less than
max_statement_mem (512000 kB)
```
@leborchuk
Copy link
Contributor

Maybe it is better to cherry-pick commit Throws ERROR when statement_mem is set to greater than max_statement_mem. greenplum-db/gpdb-archive@301c9a2 ?

Here the same has been done, but it's better not to rewrite code again, just cherry-pick the changes.

@roseduan
Copy link
Contributor Author

roseduan commented Dec 3, 2024

Maybe it is better to cherry-pick commit Throws ERROR when statement_mem is set to greater than max_statement_mem. greenplum-db/gpdb-archive@301c9a2 ?

Here the same has been done, but it's better not to rewrite code again, just cherry-pick the changes.

Thanks, that sounds great! I will cherry-pick the commit.

@roseduan roseduan closed this Dec 4, 2024
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