From 5fbb925df1f53fa7ccad292cd808fa7e7ecef994 Mon Sep 17 00:00:00 2001 From: Marco Slot Date: Tue, 7 Jul 2020 12:06:22 +0200 Subject: [PATCH] Remove level asserts in abort handler --- .../transaction/transaction_management.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/backend/distributed/transaction/transaction_management.c b/src/backend/distributed/transaction/transaction_management.c index 0e39ca905..01b55d6bb 100644 --- a/src/backend/distributed/transaction/transaction_management.c +++ b/src/backend/distributed/transaction/transaction_management.c @@ -316,19 +316,11 @@ CoordinatedTransactionCallback(XactEvent event, void *arg) ResetGlobalVariables(); /* - * Getting here without ExecutorLevel 0 is a bug, however it is such a big - * problem that will persist between reuse of the backend we still assign 0 in - * production deploys, but during development and tests we want to crash. + * We reset these mainly for posterity. The only way we would normally + * get here with ExecutorLevel or PlannerLevel > 0 is during a fatal + * error when the process is about to end. */ - Assert(ExecutorLevel == 0); ExecutorLevel = 0; - - /* - * Getting here without PlannerLevel 0 is a bug, however it is such a big - * problem that will persist between reuse of the backend we still assign 0 in - * production deploys, but during development and tests we want to crash. - */ - Assert(PlannerLevel == 0); PlannerLevel = 0; /*