Skip to content

[BABEL] Insert exec pr5 code cleanup#4856

Open
monk0707 wants to merge 5 commits into
babelfish-for-postgresql:BABEL_6_X_DEVfrom
monk0707:insert_exec_pr5_code-cleanup
Open

[BABEL] Insert exec pr5 code cleanup#4856
monk0707 wants to merge 5 commits into
babelfish-for-postgresql:BABEL_6_X_DEVfrom
monk0707:insert_exec_pr5_code-cleanup

Conversation

@monk0707

@monk0707 monk0707 commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Description

Currently, Babelfish carries two parallel implementations of INSERT ... EXECUTE, gated by the babelfishpg_tsql.enable_new_insert_exec GUC.
The original path goes via a tuple store based approach. The redesigned path introduced in PR0–PR4 (#4780#4847) works on a temp table based approach.

The cleanup removes the enable_new_insert_exec GUC declaration, and the legacy insert-exec tuple store path.

Related engine PR : babelfish-for-postgresql/postgresql_modified_for_babelfish#771

Issues Resolved

Final cleanup of the INSERT-EXEC redesign stack (PR0–PR4: #4780, #4781, #4782, #4783, #4847).

Test Scenarios Covered

  • Use case based — Existing INSERT-EXEC JDBC suites pass unchanged: stored-procedure INSERT EXEC, EXEC sp_executesql INSERT EXEC, dynamic-SQL INSERT EXEC, cross-database INSERT EXEC, INSERT EXEC into table variables, INSERT EXEC inside TRY/CATCH, and INSERT EXEC with explicit column lists.
  • Boundary conditions — Nested INSERT EXEC, column-count mismatches between procedure output and target, and INSERT EXEC where the target relation is concurrently dropped/modified all behave as before the cleanup.
  • Negative test cases — COMMIT and ROLLBACK inside an INSERT EXEC statement still raise the expected errors . INSERT EXEC inside a user-defined function still fails parser validation.
  • Minor / Major version upgrade tests — No catalog or extension SQL changes; upgrades are unaffected.
  • Performance tests — No performance-sensitive code path changed; only the dead branch of pre-existing runtime checks is removed.
  • Tooling impact — babelfishpg_tsql.enable_new_insert_exec is removed from pg_settings. Any tooling or test harness that explicitly sets this GUC will receive an "unrecognized configuration parameter" error and must drop the setting.
  • Client tests — Full JDBC test suite passes locally on the cleanup branch.

Check List

  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is under the terms of the Apache 2.0 and PostgreSQL licenses, and grant any person obtaining a copy of the contribution permission to relicense all or a portion of my contribution to the PostgreSQL License solely to contribute all or a portion of my contribution to the PostgreSQL open source project.

For more information on following Developer Certificate of Origin and signing off your commits, please check here.

monk0707 added 5 commits June 5, 2026 10:23
  OOM, FATAL, and admin shutdown so they cannot be silently swallowed.
- Allocate target_table in TopTransactionContext so the safety-net xact
  cleanup never dereferences a freed per-statement allocation.
@monk0707 monk0707 changed the title Insert exec pr5 code cleanup [BABEL] Insert exec pr5 code cleanup Jun 15, 2026
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.

1 participant