HAWQ-47. Make user able to set statement level resource usage. #34
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
user can use the following statements to set statement level resource quota. When statement level resource quota is active, target hawq resource queue setting is almost all ignored, only the resource queue capacity is considered, i.e. user can not set resource quota more than maximum capacity of the target queue.
the vseg memory can only be chosen from finite value sets : 128mb, 256mb, 512mb, 1024mb/1gb, 2048mb/2gb, 4096mb/4gb, ..., 16384mb/16gb
postgres=# show hawq_rm_stmt_nvseg;
hawq_rm_stmt_nvseg
0
(1 row)
postgres=# show hawq_rm_stmt_vseg_memory;
hawq_rm_stmt_vseg_memory
128mb
(1 row)
postgres=# set hawq_rm_stmt_nvseg=8;
SET
postgres=# set hawq_rm_stmt_vseg_memory='1gb';
SET
postgres=# insert into t values(1);
INSERT 0 1
postgres=# set hawq_rm_stmt_nvseg=10; -- in case setting too much resource!
SET
postgres=# insert into t values(1);
ERROR: failed to acquire resource because of remote error expecting too many virtual segments. (pquery.c:798)
Some error message refinement changes are also included.