-
Notifications
You must be signed in to change notification settings - Fork 176
Improve reloptions validation for partitioned tables using non-default AMs #1155
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
base: main
Are you sure you want to change the base?
Conversation
6a01e10
to
3061af5
Compare
Do we already have minmax_columns feature in CBDB? |
yes, pax has. |
Can planner use that in CBDB? |
yes, orca supported. |
Cases or examples? |
native support pax storage. IMDRelation::Erelstoragetype
CTranslatorRelcacheToDXL::RetrieveRelStorageType(Relation rel)
{
IMDRelation::Erelstoragetype rel_storage_type =
IMDRelation::ErelstorageSentinel;
switch (rel->rd_rel->relam)
{
case HEAP_TABLE_AM_OID:
rel_storage_type = IMDRelation::ErelstorageHeap;
break;
case PAX_AM_OID:
rel_storage_type = IMDRelation::ErelstoragePAX;
break;
case AO_COLUMN_TABLE_AM_OID:
rel_storage_type = IMDRelation::ErelstorageAppendOnlyCols;
break;
case AO_ROW_TABLE_AM_OID:
rel_storage_type = IMDRelation::ErelstorageAppendOnlyRows;
break;
case 0: |
show a plan ORCA how to use the minmax columns to speed up? |
please take a look |
…t AMs Previously, when creating a partitioned table without an explicit `USING` clause, the reloptions (such as minmax_columns) were validated with the assumption that the default_table_access_method is either 'heap', 'ao_row', or 'ao_column'. This could incorrectly reject valid reloptions intended for other table access methods like 'pax'. This patch adjusts the validation logic in DefineRelation() so that reloptions are only validated for partitioned tables if the default AM is one of the known AMs that support reloptions validation. For non-default AMs, reloptions are passed unvalidated to allow extensions to handle them properly. This change enables successful creation of partitioned tables using `USING pax WITH (minmax_columns=...)` without validation errors, even when `default_table_access_method` is set to 'pax'.
Previously, when creating a partitioned table without an explicit
USING
clause, the reloptions (such as minmax_columns) were validated with the assumption that the default_table_access_method is either 'heap', 'ao_row', or 'ao_column'. This could incorrectly reject valid reloptions intended for other table access methods like 'pax'.This patch adjusts the validation logic in DefineRelation() so that reloptions are only validated for partitioned tables if the default AM is one of the known AMs that support reloptions validation. For non-default AMs, reloptions are passed unvalidated to allow extensions to handle them properly.
This change enables successful creation of partitioned tables using
USING pax WITH (minmax_columns=...)
without validation errors, even whendefault_table_access_method
is set to 'pax'.Fixes #1089
What does this PR do?
Type of Change
Breaking Changes
Test Plan
make installcheck
make -C src/test installcheck-cbdb-parallel
Impact
Performance:
User-facing changes:
Dependencies:
Checklist
Additional Context
CI Skip Instructions