Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix database does not exists error when is_member(), schema_id() func…
…tion gets called in parallel query mode. (#289) This commit solve the issue of parallel worker not being able to obtain correct logical database name. Whenever get_cur_db_name() is called, it returns static char current_db_name[] which is initialized as empty. Now, parallel workers are not aware of the database name. For them, it is empty whenever get_cur_db_name() gets called. Hence, we were getting the following error: database "" does not exist So, to communicate the logical database name and more data related to babelfish we have introduced a struct BabelfishFixedParallelState. Currently BabelfishFixedParallelState has only 1 field, i.e., logical_db_name, we can add more fields to it whenever necessary. Then we will write the logical_db_name in DSM during initialization (in InitializeParallelDSM) using a hook. Another hook is used while trying to fetch the logical database name in ParallelWorkerMain(). In this way we are introduction a mechanism through which we can communicate any babelfish related information to parallel workers. Issues Resolved: BABEL-4538, BABEL-4481, BABEL-4421 Signed-off-by: Shameem Ahmed <[email protected]>
- Loading branch information