From: Simon Riggs Date: Sat, 26 Sep 2009 09:42:46 +0000 (+0100) Subject: Minor code correction on query cancel X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=13a0bd62e9bb4e180654526f82bc8ec556ec1b13;p=users%2Fsimon%2Fpostgres.git Minor code correction on query cancel --- diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index ac60d0b480..a0b0546c93 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -2690,27 +2690,24 @@ ProcessInterrupts(void) { switch (cancelMode) { + /* + * XXXHS: We don't yet have a clean way to cancel an + * idle-in-transaction session, so make it FATAL instead. + */ + case CONFLICT_MODE_ERROR: + cancelMode = CONFLICT_MODE_FATAL; + break; + case CONFLICT_MODE_ERROR_IF_NOT_IDLE: /* * If we still have a snapshot then we must * cancel, else we are free to go. - * As above, cancel means FATAL, for now. + * XXXHS: As above, cancel means FATAL, for now. */ if (MyProc->xmin == 0) - { cancelMode = CONFLICT_MODE_NOT_SET; - break; - } else - cancelMode = CONFLICT_MODE_ERROR; - /* drop through */ - - /* - * XXXHS: We don't yet have a clean way to cancel an - * idle-in-transaction session, so make it FATAL instead. - */ - case CONFLICT_MODE_ERROR: - cancelMode = CONFLICT_MODE_FATAL; + cancelMode = CONFLICT_MODE_FATAL; break; default: