Fix: pg_task / pg_task_run_history column reorder with catversion bump#1817
Open
roseduan wants to merge 1 commit into
Open
Fix: pg_task / pg_task_run_history column reorder with catversion bump#1817roseduan wants to merge 1 commit into
roseduan wants to merge 1 commit into
Conversation
Some non-varlen fields (int32 nodeport, bool active in pg_task; timestamptz start_time / end_time in pg_task_run_history) were declared after CATALOG_VARLEN, which trips LLVM bitcode emission during JIT compilation. Move them ahead of the varlen block. Because this rearranges the on-disk pg_attribute layout, bump CATALOG_VERSION_NO so an upgraded binary refuses to start against a pre-reorder cluster instead of crashing at runtime with SIGSEGV in heap_form_tuple on the first CREATE TASK. Adjust ruleutils.c pg_get_dynamic_table_schedule() to fetch the schedule via heap_getattr() since &task->schedule on the Form struct is no longer valid for varlen-section fields.
b09ca97 to
38d28f2
Compare
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.
Some non-varlen fields (int32 nodeport, bool active in pg_task; timestamptz start_time / end_time in pg_task_run_history) were declared after CATALOG_VARLEN, which trips LLVM bitcode emission during JIT compilation.
Move them ahead of the varlen block. Because this rearranges the on-disk pg_attribute layout, bump CATALOG_VERSION_NO so an upgraded binary refuses to start against a pre-reorder cluster instead of crashing at runtime with SIGSEGV in heap_form_tuple on the first CREATE TASK.
Adjust ruleutils.c pg_get_dynamic_table_schedule() to fetch the schedule via heap_getattr() since &task->schedule on the Form struct is no longer valid for varlen-section fields.
Fixes #ISSUE_Number
What does this PR do?
Type of Change
Breaking Changes
Test Plan
make installcheckmake -C src/test installcheck-cbdb-parallelImpact
Performance:
User-facing changes:
Dependencies:
Checklist
Additional Context
CI Skip Instructions