Skip to content
Permalink
Browse files
HAWQ-1820. avoid of qe termination by proxy dispatcher
  • Loading branch information
ztao1987 committed Dec 9, 2021
1 parent fa70c5b commit 3636513fb67db810894d859c4cdda6c6f2a70fc2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
@@ -54,6 +54,7 @@
GpRoleValue Gp_role; /* Role paid by this Greenplum Database backend */
char *gp_role_string; /* Staging area for guc.c */
bool gp_set_read_only; /* Staging area for guc.c */
bool gp_is_proxy_dispatcher = false;
bool proxy_dispatcher_prepare_error = false;

GpRoleValue Gp_session_role; /* Role paid by this Greenplum Database backend */
@@ -4903,7 +4903,7 @@ PostgresMain(int argc, char *argv[], const char *username)
/*
* (3) read a command (loop blocks here)
*/
if (Gp_role == GP_ROLE_DISPATCH)
if (Gp_role == GP_ROLE_DISPATCH && !gp_is_proxy_dispatcher)
{
/*
* We want to check to see if our session goes "idle" (nobody sending us work to do)
@@ -5504,6 +5504,7 @@ PostgresMain(int argc, char *argv[], const char *username)
case 'V': /* HAWQ proxy dispatcher startup info*/
{
Gp_role = GP_ROLE_DISPATCH; // I am proxy dispatcher
gp_is_proxy_dispatcher = true;
PG_TRY();
{
set_ps_display("proxy dispatcher", false);
@@ -144,6 +144,8 @@ extern char *gp_role_string; /* Use by guc.c as staging area for value. */
extern const char *assign_gp_role(const char *newval, bool doit, GucSource source);
extern const char *show_gp_role(void);

extern bool gp_is_proxy_dispatcher;

extern bool proxy_dispatcher_prepare_error;

extern bool gp_reraise_signal; /* try to force a core dump ?*/

0 comments on commit 3636513

Please sign in to comment.