diff options
| author | Michael P | 2011-05-31 05:30:42 +0000 |
|---|---|---|
| committer | Michael P | 2011-05-31 05:45:41 +0000 |
| commit | 86fb8b6ba5bf6646ef32d03882b98ad46897dfe1 (patch) | |
| tree | 2f95e62acfcc0b8857ed8601e9cdd7004129b928 | |
| parent | 2c8118bade2df8636928aac73b73a2fc1e6c25cf (diff) | |
Correction of GTM connection initialization at backend start
When Coordinator <-> Coordinator connections were created due to a DDL
or a utility query, backend coordinator initialized connections to GTM and Pooler
on uselessly.
This was increasing slightly the number of backends on GTM, possibly
causing a crash due to a too high number of threads opened on GTM.
A sudden crash of GTM may have huge impact on data visibility or
consistency, so this bug was perhaps the origin of multiple problems
seen during performance tests.
It is thought that this bug is present in XC since the implementation of
DDL synchronization, done in August/September 2010.
| -rw-r--r-- | src/backend/postmaster/postmaster.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c index b39dda0f8e..406d0a1234 100644 --- a/src/backend/postmaster/postmaster.c +++ b/src/backend/postmaster/postmaster.c @@ -3371,7 +3371,7 @@ BackendStartup(Port *port) #ifdef PGXC /* PGXC_COORD */ /* Don't get a Pooler Handle if Postmaster is activated from another Coordinator */ - if (IS_PGXC_COORDINATOR) + if (IS_PGXC_COORDINATOR && !IsConnFromCoord()) { pool_handle = GetPoolManagerHandle(); if (pool_handle == NULL) @@ -3414,11 +3414,10 @@ BackendStartup(Port *port) BackendInitialize(port); #ifdef PGXC /* PGXC_COORD */ - if (IS_PGXC_COORDINATOR) + if (IS_PGXC_COORDINATOR && !IsConnFromCoord()) { /* User is authenticated and dbname is known at this point */ PoolManagerConnect(pool_handle, port->database_name, port->user_name); - InitGTM(); } #endif @@ -3428,7 +3427,7 @@ BackendStartup(Port *port) #endif /* EXEC_BACKEND */ #ifdef PGXC /* PGXC_COORD */ - if (IS_PGXC_COORDINATOR) + if (IS_PGXC_COORDINATOR && !IsConnFromCoord()) PoolManagerCloseHandle(pool_handle); #endif |
