hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m..@apache.org
Subject incubator-hawq git commit: HAWQ-368. Fix runawqy query cancellation issue. closes #376
Date Fri, 26 Feb 2016 03:49:01 GMT
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 3d39d8f3f -> f94b8194c


HAWQ-368. Fix runawqy query cancellation issue. closes #376

Signed-off-by: Karthikeyan Jambu Rajaraman <karthi.jrk@gmail.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/f94b8194
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/f94b8194
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/f94b8194

Branch: refs/heads/master
Commit: f94b8194cb3ff12f61e8013d97a724f4f9ca9d54
Parents: 3d39d8f
Author: Foyzur Rahman <frahman@gmail.com>
Authored: Tue Feb 23 14:12:54 2016 -0800
Committer: Ming LI <mli@pivotal.io>
Committed: Fri Feb 26 11:48:42 2016 +0800

----------------------------------------------------------------------
 src/backend/tcop/postgres.c | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/f94b8194/src/backend/tcop/postgres.c
----------------------------------------------------------------------
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c
index 71c4c2a..c946a42 100644
--- a/src/backend/tcop/postgres.c
+++ b/src/backend/tcop/postgres.c
@@ -4652,7 +4652,21 @@ PostgresMain(int argc, char *argv[], const char *username)
 		}
 
 		IdleTracker_DeactivateProcess();
-		firstchar = ReadCommand(&input_message);
+		/*
+		 * During read command, if we have any exception we want to reactivate the process
+		 * before falling back to postgres main exception handler.
+		 */
+		PG_TRY();
+		{
+			firstchar = ReadCommand(&input_message);
+		}
+		PG_CATCH();
+		{
+			IdleTracker_ActivateProcess();
+			elog(LOG, "Caught exception while reading command");
+			PG_RE_THROW();
+		}
+		PG_END_TRY();
 		IdleTracker_ActivateProcess();
 
 		if (!IsTransactionOrTransactionBlock()){


Mime
View raw message