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 crash with ORCA for partition tables with rewritten rules #6364

Merged
merged 1 commit into from Dec 5, 2018

Conversation

bhuvnesh2703
Copy link
Contributor

@bhuvnesh2703 bhuvnesh2703 commented Nov 29, 2018

Earlier, the check for identifying if a table is randomly distributed relied
on the policy to be not null, however if we have rewritten rules on child
partition table, the table storage is marked as RELSTORAGE_VIRTUAL which can
lead to null policy.

Should the table be marked with virtual storage, that's a different issue though.

Master already handles this:
https://github.com/greenplum-db/gpdb/blob/master/src/backend/utils/cache/lsyscache.c#L4218
https://github.com/greenplum-db/gpdb/blob/master/src/backend/utils/cache/lsyscache.c#L4238

Also, in master, the relstorage is not marked as virtual.

Earlier the query used to crash for orca, now it will error out.
Github Issue: #5913

Earlier, the check for identifying if a table is randomly distributed relied
on the policy to be not null, however if we have rewritten rules on child
partition table, the table storage is marked as RELSTORAGE_VIRTUAL which can
lead to null policy.

Should the table be marked with virtual storage, that's a different issue though.
@bhuvnesh2703 bhuvnesh2703 merged commit 8359148 into greenplum-db:5X_STABLE Dec 5, 2018
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.

None yet

4 participants