Skip to content

Commit

Permalink
Fixed "database "" does not exist" error in parallel worker (#1872) (#…
Browse files Browse the repository at this point in the history
…1882)

Error "database "" does not exist" is being throw from Parallel worker during initialisation of GUC space. As matter of fact,
we should not care to restore the value of babelfishpg_tsql.identity_insert because value of the same would not be used
in parallel worker execution. Hence, this commit avoids assigning babelfishpg_tsql.identity_insert inside parallel worker.

Note on test: Given JDBC test cases are sufficient but currently parallel worker is running into other crashes or issues so we can not really show tests here. Have tested this changes locally.

Task: BABEL-4420
Signed-off-by: Dipesh Dhameliya <[email protected]>
  • Loading branch information
Deepesh125 authored Oct 4, 2023
1 parent 09a619d commit ac99472
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions contrib/babelfishpg_tsql/src/pl_handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

#include "access/attnum.h"
#include "access/htup_details.h"
#include "access/parallel.h"
#include "access/table.h"
#include "catalog/heap.h"
#include "catalog/indexing.h"
Expand Down Expand Up @@ -259,6 +260,9 @@ set_procid(Oid oid)
static void
assign_identity_insert(const char *newval, void *extra)
{
if (IsParallelWorker())
return;

if (strcmp(newval, "") != 0)
{
List *elemlist;
Expand Down

0 comments on commit ac99472

Please sign in to comment.