You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hawq.apache.org by rl...@apache.org on 2018/01/02 12:21:38 UTC
incubator-hawq git commit: HAWQ-1573. Clear debug_query_string in
proc_exit to avoid crash
Repository: incubator-hawq
Updated Branches:
refs/heads/master 260750758 -> 4fd7565ed
HAWQ-1573. Clear debug_query_string in proc_exit to avoid crash
Backport following commit from PostgreSQL:
commit e1eb7c81192bec3735eed3228202b400f31c8010
Author: Tom Lane <tg...@sss.pgh.pa.us>
Date: Sat Mar 20 00:58:21 2010 +0000
Report from Xiaowen Zheng <xi...@alibaba-inc.com>
Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/4fd7565e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/4fd7565e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/4fd7565e
Branch: refs/heads/master
Commit: 4fd7565ed6a150aa1e4e00cf53563a8f6dbe5b73
Parents: 2607507
Author: Kuien Liu <ku...@alibaba-inc.com>
Authored: Fri Dec 15 12:51:07 2017 +0800
Committer: rlei <rl...@pivotal.io>
Committed: Tue Jan 2 20:20:19 2018 +0800
----------------------------------------------------------------------
src/backend/storage/ipc/ipc.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/4fd7565e/src/backend/storage/ipc/ipc.c
----------------------------------------------------------------------
diff --git a/src/backend/storage/ipc/ipc.c b/src/backend/storage/ipc/ipc.c
index bff9a2c..9da5164 100644
--- a/src/backend/storage/ipc/ipc.c
+++ b/src/backend/storage/ipc/ipc.c
@@ -24,12 +24,13 @@
#include <sys/stat.h>
#include "cdb/cdbdisp.h"
+#include "libpq/pqsignal.h"
#include "miscadmin.h"
#ifdef PROFILE_PID_DIR
#include "postmaster/autovacuum.h"
#endif
#include "storage/ipc.h"
-#include "libpq/pqsignal.h"
+#include "tcop/tcopprot.h"
/*
* This flag is set during proc_exit() to change ereport()'s behavior,
@@ -183,6 +184,9 @@ proc_exit_prepare(int code)
*/
error_context_stack = NULL;
+ /* For the same reason, reset debug_query_string before it's clobbered */
+ debug_query_string = NULL;
+
/*
* Make sure interconnect thread quit before shmem_exit() in FATAL case.
* Otherwise, shmem_exit() may free MemoryContex of MotionConns in connHtab unexpectedly;