From 35ad1a45e0e8633e23a1341d46692d6ccf17aae0 Mon Sep 17 00:00:00 2001 From: Michael P Date: Wed, 23 Feb 2011 13:41:59 +0900 Subject: Fix for DROP DATABASE If a database pool is not found in pooler when cleaning connections, consider it as already clean. When dropping a database, connection clean is made only in the local node. --- src/backend/pgxc/pool/poolmgr.c | 4 ++-- src/backend/tcop/utility.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/backend/pgxc/pool/poolmgr.c b/src/backend/pgxc/pool/poolmgr.c index fb9ca0070f..fc8be2f669 100644 --- a/src/backend/pgxc/pool/poolmgr.c +++ b/src/backend/pgxc/pool/poolmgr.c @@ -1920,9 +1920,9 @@ clean_connection(List *dn_discard, List *co_discard, const char *database) /* Find correct Database pool to clean */ databasePool = find_database_pool(database); - /* Database pool has not been found */ + /* Database pool has not been found, it is already clean */ if (!databasePool) - return CLEAN_CONNECTION_NOT_COMPLETED; + return CLEAN_CONNECTION_COMPLETED; /* * Clean each Pool Correctly diff --git a/src/backend/tcop/utility.c b/src/backend/tcop/utility.c index f060922084..9dcc634606 100644 --- a/src/backend/tcop/utility.c +++ b/src/backend/tcop/utility.c @@ -1051,8 +1051,8 @@ ProcessUtility(Node *parsetree, DropdbStmt *stmt = (DropdbStmt *) parsetree; #ifdef PGXC - /* Clean connections before dropping a database */ - if (IS_PGXC_COORDINATOR && !IsConnFromCoord()) + /* Clean connections before dropping a database on local node */ + if (IS_PGXC_COORDINATOR) DropDBCleanConnection(stmt->dbname); #endif -- cgit v1.2.3