diff options
author | Pavan Deolasee | 2015-06-23 11:12:06 +0000 |
---|---|---|
committer | Pavan Deolasee | 2015-06-23 11:12:06 +0000 |
commit | 250b2f0e3414e6510d6c42c44eeea79a19c62639 (patch) | |
tree | a422785ac6f7304cf807f7bf02b029aeb525aefc /src/backend/tcop/postgres.c | |
parent | 289cba11506536aa156c14e322ab09b8a8b7a21c (diff) |
Find and remember node id of the remote node as set via SET global_session
command during shared queue acquire/bind time
Current code had calls to find this out during shared queue release. Given that
shared queue release may be called during transaction abort and the fact that
we can no longer make any sys cache lookup in abort call path, it seems much
safer to note and remember this value when its used for the first time in the
session
(We could have remembered this value when SET global_session command is
processed. But that happens during backend startup time and we haven't yet
setup the datanode and coordinator node handles at that time. So we can't
really determine the node id, which an index into the array of these handles,
at that time)
Diffstat (limited to 'src/backend/tcop/postgres.c')
-rw-r--r-- | src/backend/tcop/postgres.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index 5a2420ad5a..d09945264c 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -88,6 +88,7 @@ #include "mb/pg_wchar.h" #ifdef PGXC +#include "catalog/pgxc_node.h" #include "storage/procarray.h" #include "pgxc/pgxc.h" #include "access/gtm.h" @@ -4059,6 +4060,8 @@ PostgresMain(int argc, char *argv[], #endif #ifdef XCP parentPGXCNode = NULL; + parentPGXCNodeId = -1; + parentPGXCNodeType = PGXC_NODE_DATANODE; cluster_lock_held = false; cluster_ex_lock_held = false; #endif /* XCP */ |