diff options
author | Michael P | 2012-03-09 02:30:02 +0000 |
---|---|---|
committer | Michael P | 2012-03-09 02:37:33 +0000 |
commit | 36d40e8b5dd844c99af25a053f6540f36ebd82db (patch) | |
tree | ad788c12509d8f066093103bd7cc5b6da29584f1 /src/backend/utils/adt/lockfuncs.c | |
parent | b3f877f80a81eab00444d21887fc5a25d3ea2876 (diff) |
Switch node definition information to shared memory in pooler
This removes dependency of pooler process with catalog table cache.
Shared memory on pooler is organized now as follows:
- PoolerMemoryContext (well an existing one), allocated in TopMemoryContext
and used by the pooler process
- PoolerCoreContext, allocated in PoolerMemoryContext, used by database pool
contexts.
- PoolerAgentContext, pooler agent context and used by pooler agents.
The pooler agent now uses node Oids instead of node indexes. This
protects pooler agents in case of node reordering after catalog tables
being modified due to node DDL. The warning/error message which was thrown
back to client connection from server if connection information was
inconsistent is also removed thanks to that.
Two new GUC parameters are used to define the maximum number of
Coordinators and Datanodes on Coordinator respectively called
max_coordinators and max_datanodes. This represents the maximum
number of nodes that can be defined in cluster, and does not influence
the dynamic behavior of cluster.
A node definition slot in shared memory takes approximately 140 bytes.
Patch by Andrei Martsinchyk.
Review, some fix issues (preferred/primary support...) and some workarounds
by me. Performance has been checked by Sutou Takayuki.
Diffstat (limited to 'src/backend/utils/adt/lockfuncs.c')
-rw-r--r-- | src/backend/utils/adt/lockfuncs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/utils/adt/lockfuncs.c b/src/backend/utils/adt/lockfuncs.c index 2306b35a45..e437103ce0 100644 --- a/src/backend/utils/adt/lockfuncs.c +++ b/src/backend/utils/adt/lockfuncs.c @@ -474,7 +474,7 @@ pgxc_advisory_lock(int64 key64, int32 key1, int32 key2, bool iskeybig, else SET_LOCKTAG_INT32(locktag, key1, key2); - PgxcNodeListAndCount(&coOids, &dnOids, &numcoords, &numdnodes); + PgxcNodeGetOids(&coOids, &dnOids, &numcoords, &numdnodes, false); /* Skip everything XC specific if there's only one coordinator running */ if (numcoords <= 1) |