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

Move optimizer_enable_query_parameter GUC to Orca extension #1172

Open
wants to merge 5 commits into
base: feature/ADBDEV-6552
Choose a base branch
from

Conversation

whitehawk
Copy link

@whitehawk whitehawk commented Dec 27, 2024

Move optimizer_enable_query_parameter GUC to Orca extension

Problem:
'optimizer_enable_query_parameter' GUC is a setting that affects Orca behavior,
so we would like it to reside in Orca. But this GUC was also referenced by the
core (in 'choose_custom_plan()'). It prevented moving of the GUC to the
extension.

Fix:
In 'choose_custom_plan()' the GUC was used to make a decision whether to use
custom or generic plan in plan cache manager. In general, this decision can be
affected by different parameters, and a generic external planner should be able
to have control over this decision. Thus, this patch:

  • Adds a hook, that is checked in 'choose_custom_plan()'.
  • Moves the custom logic, involving 'optimizer_enable_query_parameter' GUC,
    to the extension side.
  • Moves 'optimizer_enable_query_parameter' GUC into the extension.
  • Also, it removes some names from 'unsync_guc_name.h', that were moved to the
    extension previously.

@whitehawk whitehawk marked this pull request as ready for review December 27, 2024 03:30
@andr-sokolov
Copy link
Member

Can we revert 38f4cb8 instead of replacing GUC with hook? The purpose is to make it simpler bumping PostgreSQL version, to reduce difference between PostgreSQL and GPDB, but the diff in choose_custom_plan() is increased.

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.

2 participants