Add new GUC gp_max_scan_on_shmem which replaced MAX_SCAN_ON_SHMEM#433
Merged
Conversation
RekGRpth
previously approved these changes
Nov 25, 2022
|
I've checked all the places where new GUC was added and it seems all is correct. The one thing I can suggest is to extend existed regression test (src/test/regress/sql/instr_in_shmem.sql) and test new GUC like it's done for GP_INSTRUMENT_SHMEM_SIZE. |
maksm90
reviewed
Dec 5, 2022
maksm90
left a comment
There was a problem hiding this comment.
Won't this GUC conflict with overall limit of shared memory for instrumentation objects gp_instrument_shmem_size? I.e. are we able allocate more intrumentations for SeqScan nodes in shared memory than shmem is available at all?
d2b61f4 to
8506424
Compare
It repalced the hard-coded define MAX_SCAN_ON_SHMEM. Specifies the limit of maximum scan node's instrumentations per query in shmem. If table has many partitions, Postgres planner will generate a plan with many SCAN nodes under a APPEND node. If the number of partitions are too many, this plan will occupy too many slots. Here is a limitation on number of shmem slots used by scan nodes for each backend. Instruments exceeding the limitation are allocated in local memory.
RekGRpth
approved these changes
Dec 8, 2022
Stolb27
approved these changes
Dec 22, 2022
This was referenced Jan 26, 2023
Merged
Stolb27
pushed a commit
that referenced
this pull request
Mar 4, 2024
It repalced the hard-coded define MAX_SCAN_ON_SHMEM. Specifies the limit of maximum scan node's instrumentations per query in shmem. If table has many partitions, Postgres planner will generate a plan with many SCAN nodes under a APPEND node. If the number of partitions are too many, this plan will occupy too many slots. Here is a limitation on number of shmem slots used by scan nodes for each backend. Instruments exceeding the limitation are allocated in local memory. (cherry picked from commit 6425610)
Stolb27
pushed a commit
that referenced
this pull request
Mar 14, 2024
It repalced the hard-coded define MAX_SCAN_ON_SHMEM. Specifies the limit of maximum scan node's instrumentations per query in shmem. If table has many partitions, Postgres planner will generate a plan with many SCAN nodes under a APPEND node. If the number of partitions are too many, this plan will occupy too many slots. Here is a limitation on number of shmem slots used by scan nodes for each backend. Instruments exceeding the limitation are allocated in local memory. (cherry picked from commit 6425610)
KnightMurloc
pushed a commit
that referenced
this pull request
Feb 3, 2025
It repalced the hard-coded define MAX_SCAN_ON_SHMEM. Specifies the limit of maximum scan node's instrumentations per query in shmem. If table has many partitions, Postgres planner will generate a plan with many SCAN nodes under a APPEND node. If the number of partitions are too many, this plan will occupy too many slots. Here is a limitation on number of shmem slots used by scan nodes for each backend. Instruments exceeding the limitation are allocated in local memory. (cherry picked from commit 6425610)
KnightMurloc
pushed a commit
that referenced
this pull request
Feb 3, 2025
It repalced the hard-coded define MAX_SCAN_ON_SHMEM. Specifies the limit of maximum scan node's instrumentations per query in shmem. If table has many partitions, Postgres planner will generate a plan with many SCAN nodes under a APPEND node. If the number of partitions are too many, this plan will occupy too many slots. Here is a limitation on number of shmem slots used by scan nodes for each backend. Instruments exceeding the limitation are allocated in local memory. (cherry picked from commit 6425610)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
New GUC specifies the limit of maximum scan node's instrumentations per query in shmem. If table has many partitions, Postgres planner will generate a plan with many SCAN nodes under a APPEND node. If the number of partitions are too many, this plan will occupy too many slots. Here is a limitation on number of shmem slots used by scan nodes for each backend. Instruments exceeding the limitation are allocated in local memory.
Here are some reminders before you submit the pull request
make installcheck