Skip to content

Add resource group bypassing for GUC rollback - #438

Merged
Smyatkin-Maxim merged 1 commit into
OPENGPDB_6_30_STABLEfrom
bypass-resgroup-in-guc-restore
Oct 8, 2026
Merged

Smyatkin-Maxim merged 1 commit into
OPENGPDB_6_30_STABLEfrom
bypass-resgroup-in-guc-restore

Conversation

@Smyatkin-Maxim

Copy link
Copy Markdown
Contributor

GP guc changes are not transactionally safe on QE side and there is a hack to restore previous setting with the next BE request. This hack, however, fails to bypass RG controls because debug_query_string is NULL. This commit forces RG bypass and adds a simple test for this case.

GP guc changes are not transactionally safe on QE side and there is a
hack to restore previous setting with the next BE request. This hack,
however, fails to bypass RG controls because debug_query_string is NULL.
This commit forses RG bypass and adds a simple test for this case.

@leborchuk leborchuk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, clearly it's the main issue.

By the way, in cloudberry we have the same issue since the PR with bug apache/cloudberry@73cab2c is in cloudberry too.

You also could look at arenadata/greengage@dc3b23a

There are a lot of code not relevant our issue here, but look at

MemoryContext oldcontext = CurrentMemoryContext;
...
			/*
			 * this is a top-level catch block and we are responsible for
			 * restoring the right memory context.
			 */
			MemoryContextSwitchTo(oldcontext);
		}
		PG_END_TRY();

Maybe it also worth to restore original Memory Context

@Smyatkin-Maxim
Smyatkin-Maxim merged commit 70b30cc into OPENGPDB_6_30_STABLE Oct 8, 2026
40 of 42 checks passed
Smyatkin-Maxim added a commit that referenced this pull request Oct 8, 2026
GP guc changes are not transactionally safe on QE side and there is a
hack to restore previous setting with the next BE request. This hack,
however, fails to bypass RG controls because debug_query_string is NULL.
This commit forses RG bypass and adds a simple test for this case.
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