diff options
author | Michael P | 2011-02-23 04:41:59 +0000 |
---|---|---|
committer | Pavan Deolasee | 2011-05-19 17:49:38 +0000 |
commit | 35ad1a45e0e8633e23a1341d46692d6ccf17aae0 (patch) | |
tree | 2beced7c162d25c7cd8142b2afb7f5ad5774780e /src | |
parent | 77e5b2631ecc27ef2eac0cf05bfdaccf653c8aa9 (diff) |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/pgxc/pool/poolmgr.c | 4 | ||||
-rw-r--r-- | src/backend/tcop/utility.c | 4 |
2 files changed, 4 insertions, 4 deletions
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 |