diff options
author | Pavan Deolasee | 2014-07-28 13:15:05 +0000 |
---|---|---|
committer | Pavan Deolasee | 2014-09-01 14:20:29 +0000 |
commit | 55700225386484f8a0b2d96b66e3cca64a142541 (patch) | |
tree | 3c31d89b8e79bd7537a128ccdb781460a2b39398 | |
parent | 20aa206c72713d309bca578c983572515cbc4a00 (diff) |
Fix reference to "node id" where we really should be looking at nodeOid
While executing ALTER NODE we check if the node being altered is marked as
a "primary" datanode and fail if there already exists another datanode marked
as "primary". But while checking for self, we compare with primary_data_node
which is really an OID of the node and not the node id. Fix that so that we
compare with the right value
-rw-r--r-- | src/backend/pgxc/nodemgr/nodemgr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/pgxc/nodemgr/nodemgr.c b/src/backend/pgxc/nodemgr/nodemgr.c index 844c2fa9f2..7fcf072786 100644 --- a/src/backend/pgxc/nodemgr/nodemgr.c +++ b/src/backend/pgxc/nodemgr/nodemgr.c @@ -669,7 +669,7 @@ PgxcNodeAlter(AlterNodeStmt *stmt) */ if (is_primary && OidIsValid(primary_data_node) && - node_id != primary_data_node) + nodeOid != primary_data_node) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), errmsg("PGXC node %s: two nodes cannot be primary", |