Skip to content

Fix planner and executor compiler diagnostics - #2390

Open
reshke wants to merge 1 commit into
apache:mainfrom
reshke:fix-compiler-warnings-planner-state
Open

reshke wants to merge 1 commit into
apache:mainfrom
reshke:fix-compiler-warnings-planner-state

Conversation

@reshke

@reshke reshke commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

GCC reported functions.c:1306:33: variable 'completed' might be clobbered by longjmp (-Wclobbered). The strict build also flagged planner timing state as potentially uninitialized. Initialize the per-call state and keep the planner configuration stable across the hook and fallback paths; remove redundant header declarations.

Fixes #ISSUE_Number

What does this PR do?

Type of Change

  • Bug fix (non-breaking change)
  • New feature (non-breaking change)
  • Breaking change (fix or feature with breaking changes)
  • Documentation update

Breaking Changes

Test Plan

  • Unit tests added/updated
  • Integration tests added/updated
  • Passed make installcheck
  • Passed make -C src/test installcheck-cbdb-parallel

Impact

Performance:

User-facing changes:

Dependencies:

Checklist

Additional Context

CI Skip Instructions


@reshke
reshke force-pushed the fix-compiler-warnings-planner-state branch from 120a6eb to dca7bb4 Compare November 23, 2026 20:35
@reshke
reshke enabled auto-merge (squash) November 23, 2026 21:37

@Alena0704 Alena0704 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Optional cleanup: sorted_path and partial_target_exprs are assigned but never used. Both predate this PR and could be removed in a separate cleanup commit. This is not a blocker for the current PR.

@yjhjstz yjhjstz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM,need to backport?

@reshke
reshke force-pushed the fix-compiler-warnings-planner-state branch from dca7bb4 to 4a39bf6 Compare November 25, 2026 20:05
@reshke

reshke commented Nov 25, 2026

Copy link
Copy Markdown
Contributor Author

LGTM,need to backport?

Yes, makes sence

Cache the optimization-time setting for compiler diagnostics and preserve rule actions when a set-returning function buffers its result.

Reproducer: select insert_tt2('foollog','barlog') limit 1;
@tuhaihe
tuhaihe force-pushed the fix-compiler-warnings-planner-state branch from 4a39bf6 to 3a8df33 Compare November 26, 2026 02:01
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.

3 participants