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

Set current db_id along with db_name for parallel workers #3330

Merged

Conversation

sumitj824
Copy link
Contributor

@sumitj824 sumitj824 commented Dec 30, 2024

Description

This commit addresses the issue of empty result sets in queries joining with sys.db_id() or sys.db_name() in Enforced Parallel Query mode by setting the current_db_id in addition to current_db_name for parallel workers.

Signed-off-by: Sumit Jaiswal [email protected]

Issues Resolved

Task: BABEL-5504

Root cause

While we were communicating the logical database name to parallel workers and setting the current_db_name using logical database name (Ref: #2262), we failed to set current_db_id. This omission affected functions like sys.db_id() and sys.db_name(), resulting in empty result sets for queries involving these functions in parallel execution contexts.

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.

@shardgupta shardgupta merged commit 5af6776 into babelfish-for-postgresql:BABEL_2_X_DEV Dec 30, 2024
30 checks passed
@shardgupta shardgupta deleted the sumiji-fix-2x branch December 30, 2024 15:45
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