summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Paquier2012-05-30 08:45:13 +0000
committerMichael Paquier2012-05-30 08:49:26 +0000
commit68032614b0a99f4b0ba666b52cbbf4dd30566e70 (patch)
treeb2b42c2e2e739c442cbb60e9b899b62450384ae5
parentce8261042c5eaf0866770f2628efbf77590bb24a (diff)
Update code comments: use "Coordinator" and "Datanode" as conventional terms
This unifies the convention name for Coordinator and Datanode in Postgres-XC with documentation.
-rw-r--r--src/backend/access/common/printtup.c2
-rw-r--r--src/backend/access/transam/twophase.c4
-rw-r--r--src/backend/access/transam/xact.c6
-rw-r--r--src/backend/catalog/dependency.c2
-rw-r--r--src/backend/commands/copy.c38
-rw-r--r--src/backend/commands/prepare.c14
-rw-r--r--src/backend/commands/tablecmds.c4
-rw-r--r--src/backend/commands/vacuum.c4
-rw-r--r--src/backend/executor/functions.c2
-rw-r--r--src/backend/executor/nodeAgg.c10
-rw-r--r--src/backend/optimizer/path/allpaths.c2
-rw-r--r--src/backend/optimizer/plan/createplan.c70
-rw-r--r--src/backend/optimizer/plan/planner.c16
-rw-r--r--src/backend/parser/analyze.c4
-rw-r--r--src/backend/parser/parse_agg.c4
-rw-r--r--src/backend/pgxc/barrier/barrier.c50
-rw-r--r--src/backend/pgxc/locator/locator.c4
-rw-r--r--src/backend/pgxc/nodemgr/nodemgr.c4
-rw-r--r--src/backend/pgxc/plan/planner.c130
-rw-r--r--src/backend/pgxc/pool/execRemote.c188
-rw-r--r--src/backend/pgxc/pool/pgxcnode.c6
-rw-r--r--src/backend/pgxc/pool/poolmgr.c40
-rw-r--r--src/backend/pgxc/pool/poolutils.c4
-rw-r--r--src/backend/pgxc/pool/postgresql_fdw.c10
-rw-r--r--src/backend/rewrite/rewriteHandler.c2
-rw-r--r--src/backend/storage/ipc/procarray.c18
-rw-r--r--src/backend/tcop/postgres.c8
-rw-r--r--src/backend/tcop/utility.c8
-rw-r--r--src/backend/utils/adt/dbsize.c14
-rw-r--r--src/backend/utils/adt/lockfuncs.c24
-rw-r--r--src/backend/utils/adt/ruleutils.c6
-rw-r--r--src/backend/utils/cache/lsyscache.c4
-rw-r--r--src/backend/utils/cache/plancache.c8
-rw-r--r--src/bin/pg_ctl/pg_ctl.c4
-rw-r--r--src/gtm/common/elog.c2
-rw-r--r--src/gtm/main/gtm_txn.c4
-rw-r--r--src/gtm/main/main.c2
-rw-r--r--src/include/executor/tuptable.h2
-rw-r--r--src/include/nodes/parsenodes.h4
-rw-r--r--src/include/nodes/plannodes.h2
-rw-r--r--src/include/nodes/relation.h2
-rw-r--r--src/include/pgxc/execRemote.h8
-rw-r--r--src/include/pgxc/locator.h2
-rw-r--r--src/include/pgxc/pgxcnode.h6
-rw-r--r--src/include/pgxc/planner.h6
-rw-r--r--src/include/pgxc/poolmgr.h4
-rw-r--r--src/pgxc/bin/pgxc_clean/pgxc_clean.c34
-rw-r--r--src/test/regress/expected/xc_misc.out2
-rw-r--r--src/test/regress/pg_regress.c4
49 files changed, 398 insertions, 400 deletions
diff --git a/src/backend/access/common/printtup.c b/src/backend/access/common/printtup.c
index 8b5f4a862f..6cf4102712 100644
--- a/src/backend/access/common/printtup.c
+++ b/src/backend/access/common/printtup.c
@@ -312,7 +312,7 @@ printtup(TupleTableSlot *slot, DestReceiver *self)
/*
* If we are having DataRow-based tuple we do not have to encode attribute
* values, just send over the DataRow message as we received it from the
- * data node
+ * Datanode
*/
if (slot->tts_dataRow)
{
diff --git a/src/backend/access/transam/twophase.c b/src/backend/access/transam/twophase.c
index d8bd7614b7..411e4b2267 100644
--- a/src/backend/access/transam/twophase.c
+++ b/src/backend/access/transam/twophase.c
@@ -1262,7 +1262,7 @@ StandbyTransactionIdIsPrepared(TransactionId xid)
*
* With regard to xc_maintenance_mode related to pgxc_clean, COMMIT/ROLLBACK PREPARED
* might be called in the node where the transaction with given gid does not exist.
- * This may happen at the originating coordinator. In this case, we should
+ * This may happen at the originating Coordinator. In this case, we should
* skip to handle two-phase file.
*
* Please note that we don't have to write commit/abort log to WAL in this case.
@@ -1293,7 +1293,7 @@ FinishPreparedTransaction(const char *gid, bool isCommit)
/*
* LockGXact returns NULL if this node does not contain given two-phase
* TXN. This can happen when COMMIT/ROLLBACK PREPARED is issued at
- * the originating coordinator for cleanup.
+ * the originating Coordinator for cleanup.
* In this case, no local handling is needed. Only report to GTM
* is needed and this has already been handled in
* FinishRemotePreparedTransaction().
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c
index 7dcc913a19..7202ad5c6d 100644
--- a/src/backend/access/transam/xact.c
+++ b/src/backend/access/transam/xact.c
@@ -2000,12 +2000,12 @@ CommitTransaction(void)
#ifdef PGXC
/*
- * If we are a coordinator and currently serving the client,
+ * If we are a Coordinator and currently serving the client,
* we must run a 2PC if more than one nodes are involved in this
* transaction. We first prepare on the remote nodes and if everything goes
* right, we commit locally and then commit on the remote nodes. We must
- * also be careful to prepare locally on this coordinator only if the
- * local coordinator has done some write activity.
+ * also be careful to prepare locally on this Coordinator only if the
+ * local Coordinator has done some write activity.
*
* If there are any errors, they will be reported via ereport and the
* transaction will be aborted.
diff --git a/src/backend/catalog/dependency.c b/src/backend/catalog/dependency.c
index 07b2eea8e7..3958e168cc 100644
--- a/src/backend/catalog/dependency.c
+++ b/src/backend/catalog/dependency.c
@@ -1190,7 +1190,7 @@ doDeletion(const ObjectAddress *object)
if (!IsTempSequence(object->objectId))
{
/*
- * The sequence has already been removed from coordinator,
+ * The sequence has already been removed from Coordinator,
* finish the stuff on GTM too
*/
diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c
index 911958626b..9b48ba2ce7 100644
--- a/src/backend/commands/copy.c
+++ b/src/backend/commands/copy.c
@@ -199,9 +199,9 @@ typedef struct CopyStateData
int raw_buf_len; /* total # of bytes stored */
#ifdef PGXC
/*
- * On coordinator we need to rewrite query.
- * While client may submit a copy command dealing with file, data nodes
- * always send/receive data to/from the coordinator. So we can not use
+ * On Coordinator we need to rewrite query.
+ * While client may submit a copy command dealing with file, Datanodes
+ * always send/receive data to/from the Coordinator. So we can not use
* original statement and should rewrite statement, specifing STDIN/STDOUT
* as copy source or destination
*/
@@ -214,7 +214,7 @@ typedef struct CopyStateData
RelationLocInfo *rel_loc; /* the locator key */
int idx_dist_by_col; /* index of the distributed by column */
- PGXCNodeHandle **connections; /* Involved data node connections */
+ PGXCNodeHandle **connections; /* Involved Datanode connections */
TupleDesc tupDesc; /* for INSERT SELECT */
#endif
} CopyStateData;
@@ -772,9 +772,9 @@ CopyLoadRawBuf(CopyState cstate)
* When rewriting query to be sent down to nodes we should escape special
* characters, that may present in the value. The characters are backslash(\)
* and single quote ('). These characters are escaped by doubling. We do not
- * have to escape characters like \t, \v, \b, etc. because datanode interprets
+ * have to escape characters like \t, \v, \b, etc. because Datanode interprets
* them properly.
- * We use E'...' syntax for litherals containing backslashes.
+ * We use E'...' syntax for literals containing backslashes.
*/
static void
CopyQuoteStr(StringInfo query_buf, char *value)
@@ -1512,7 +1512,7 @@ BeginCopy(bool is_from,
if (!cstate->connections)
ereport(ERROR,
(errcode(ERRCODE_CONNECTION_EXCEPTION),
- errmsg("Failed to initialize data nodes for COPY")));
+ errmsg("Failed to initialize Datanodes for COPY")));
}
}
#endif
@@ -1853,7 +1853,7 @@ CopyTo(CopyState cstate)
#ifdef PGXC
/*
- * In PGXC, it is not necessary for a datanode to generate
+ * In PGXC, it is not necessary for a Datanode to generate
* the trailer as Coordinator is in charge of it
*/
if (cstate->binary && IS_PGXC_COORDINATOR)
@@ -2225,7 +2225,7 @@ CopyFrom(CopyState cstate)
#ifdef PGXC
/*
- * Send the data row as-is to the datanodes. If default values
+ * Send the data row as-is to the Datanodes. If default values
* are to be inserted, append them onto the data row.
*/
@@ -2260,7 +2260,7 @@ CopyFrom(CopyState cstate)
cstate->connections))
ereport(ERROR,
(errcode(ERRCODE_CONNECTION_EXCEPTION),
- errmsg("Copy failed on a data node")));
+ errmsg("Copy failed on a Datanode")));
processed++;
}
else
@@ -2456,9 +2456,9 @@ BeginCopyFrom(Relation rel,
if (IS_PGXC_COORDINATOR)
{
/*
- * If default expr is shippable to datanode, don't include
- * default values in the data row sent to the datanode; let
- * the datanode insert the default values.
+ * If default expr is shippable to Datanode, don't include
+ * default values in the data row sent to the Datanode; let
+ * the Datanode insert the default values.
*/
Expr *planned_defexpr = expression_planner((Expr *) defexpr);
if (!is_foreign_expr((Node*)planned_defexpr, NULL))
@@ -2814,7 +2814,7 @@ NextCopyFrom(CopyState cstate, ExprContext *econtext,
resetStringInfo(&cstate->line_buf);
enlargeStringInfo(&cstate->line_buf, sizeof(uint16));
- /* Receive field count directly from datanodes */
+ /* Receive field count directly from Datanodes */
fld_count = htons(fld_count);
appendBinaryStringInfo(&cstate->line_buf, (char *) &fld_count, sizeof(uint16));
}
@@ -2847,7 +2847,7 @@ NextCopyFrom(CopyState cstate, ExprContext *econtext,
resetStringInfo(&cstate->line_buf);
enlargeStringInfo(&cstate->line_buf, sizeof(uint16));
- /* Receive field count directly from datanodes */
+ /* Receive field count directly from Datanodes */
fld_count = htons(fld_count);
appendBinaryStringInfo(&cstate->line_buf, (char *) &fld_count, sizeof(uint16));
}
@@ -2960,7 +2960,7 @@ NextCopyFrom(CopyState cstate, ExprContext *econtext,
* 2. converts each default value into its output form,
* 3. then appends it into cstate->defval_buf buffer.
* This buffer would later be appended into the final data row that is sent to
- * the datanodes.
+ * the Datanodes.
* So for e.g., for a table :
* tab (id1 int, v varchar, id2 default nextval('tab_id2_seq'::regclass), id3 )
* with the user-supplied data : "2 | abcd",
@@ -2989,7 +2989,7 @@ append_defvals(Datum *values, CopyState cstate)
* For using the values in their output form, it is not sufficient
* to just call its output function. The format should match
* that of COPY because after all we are going to send this value as
- * an input data row to the datanode using COPY FROM syntax. So we call
+ * an input data row to the Datanode using COPY FROM syntax. So we call
* exactly those functions that are used to output the values in case
* of COPY TO. For instace, CopyAttributeOutText() takes care of
* escaping, CopySendInt32 take care of byte ordering, etc. All these
@@ -4396,7 +4396,7 @@ build_copy_statement(CopyState cstate, List *attnamelist,
/*
* If target table does not exists on nodes (e.g. system table)
* the location info returned is NULL. This is the criteria, when
- * we need to run Copy on coordinator
+ * we need to run COPY on Coordinator
*/
cstate->rel_loc = GetRelationLocInfo(RelationGetRelid(cstate->rel));
@@ -4433,7 +4433,7 @@ build_copy_statement(CopyState cstate, List *attnamelist,
}
/*
- * Build up query string for the data nodes, it should match
+ * Build up query string for the Datanodes, it should match
* to original string, but should have STDIN/STDOUT instead
* of filename.
*/
diff --git a/src/backend/commands/prepare.c b/src/backend/commands/prepare.c
index 83d3c6357b..f1bcd04220 100644
--- a/src/backend/commands/prepare.c
+++ b/src/backend/commands/prepare.c
@@ -50,7 +50,7 @@
static HTAB *prepared_queries = NULL;
#ifdef PGXC
/*
- * The hash table where datanode prepared statements are stored.
+ * The hash table where Datanode prepared statements are stored.
* The keys are statement names referenced from cached RemoteQuery nodes; the
* entries are DatanodeStatement structs
*/
@@ -460,7 +460,7 @@ InitQueryHashTable(void)
#ifdef PGXC
/*
* Assign the statement name for all the RemoteQueries in the plan tree, so
- * they use datanode statements
+ * they use Datanode statements
*/
int
SetRemoteStatementName(Plan *plan, const char *stmt_name, int num_params,
@@ -986,7 +986,7 @@ FetchDatanodeStatement(const char *stmt_name, bool throwError)
}
/*
- * Drop datanode statement and close it on nodes if active
+ * Drop Datanode statement and close it on nodes if active
*/
void
DropDatanodeStatement(const char *stmt_name)
@@ -1012,8 +1012,8 @@ DropDatanodeStatement(const char *stmt_name)
/*
- * Return true if there is at least one active datanode statement, so acquired
- * datanode connections should not be released
+ * Return true if there is at least one active Datanode statement, so acquired
+ * Datanode connections should not be released
*/
bool
HaveActiveDatanodeStatements(void)
@@ -1042,9 +1042,9 @@ HaveActiveDatanodeStatements(void)
/*
- * Mark datanode statement as active on specified node
+ * Mark Datanode statement as active on specified node
* Return true if statement has already been active on the node and can be used
- * Returns falsee if statement has not been active on the node and should be
+ * Returns false if statement has not been active on the node and should be
* prepared on the node
*/
bool
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index 3780a826e3..aa61251c36 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -3413,8 +3413,8 @@ ATRewriteTables(List **wqueue, LOCKMODE lockmode)
/*
* In PGXC, do not check the FK constraints on the Coordinator, and just return
* That is because a SELECT is generated whose plan will try and use
- * the data nodes. We (currently) do not want to do that on the Coordinator,
- * when the command is passed down to the data nodes it will
+ * the Datanodes. We (currently) do not want to do that on the Coordinator,
+ * when the command is passed down to the Datanodes it will
* peform the check locally.
* This issue was introduced when we added multi-step handling,
* it caused foreign key constraints to fail.
diff --git a/src/backend/commands/vacuum.c b/src/backend/commands/vacuum.c
index ba4018b92e..8f1bd6cd87 100644
--- a/src/backend/commands/vacuum.c
+++ b/src/backend/commands/vacuum.c
@@ -738,8 +738,8 @@ vac_update_datfrozenxid(void)
{
/*
* vac_truncate_clog needs a transaction id to detect wrap-arounds. For
- * a autovacuum, this would require the data node to contact the GTM or
- * the coordinator and acquire GXID for the vacuum operation.
+ * a autovacuum, this would require the Datanode to contact the GTM or
+ * the Coordinator and acquire GXID for the vacuum operation.
*
* To avoid this complexity, we disable the CLOG truncation. This is
* perfectly fine for the prototype because we are not handling GXID
diff --git a/src/backend/executor/functions.c b/src/backend/executor/functions.c
index 9f4503dcc1..98255939da 100644
--- a/src/backend/executor/functions.c
+++ b/src/backend/executor/functions.c
@@ -313,7 +313,7 @@ init_execution_state(List *queryTree_list,
{
/*
* The parameterised queries in RemoteQuery nodes will be prepared
- * on the datanode, and need parameter types for the same. Set the
+ * on the Datanode, and need parameter types for the same. Set the
* parameter types and their number in all RemoteQuery nodes in the
* plan
*/
diff --git a/src/backend/executor/nodeAgg.c b/src/backend/executor/nodeAgg.c
index edb76f5832..9982c773ed 100644
--- a/src/backend/executor/nodeAgg.c
+++ b/src/backend/executor/nodeAgg.c
@@ -250,7 +250,7 @@ typedef struct AggStatePerGroupData
* PGXCTODO: we should be able to reuse the fields above, rather than having
* separate fields here, that can be done once we get rid of different
* collection and transition result types in pg_aggregate.h. Collection at
- * coordinator is equivalent to the transition at non-XC PG.
+ * Coordinator is equivalent to the transition at non-XC PG.
*/
Datum collectValue; /* current collection value */
bool collectValueIsNull;
@@ -542,7 +542,7 @@ advance_collection_function(AggState *aggstate,
Assert(OidIsValid(peraggstate->collectfn.fn_oid));
/*
- * numArgument has to be one, since each datanode is going to send a single
+ * numArgument has to be one, since each Datanode is going to send a single
* transition value
*/
Assert(numArguments == 1);
@@ -700,7 +700,7 @@ advance_aggregates(AggState *aggstate, AggStatePerGroup pergroup)
{
Assert(IS_PGXC_COORDINATOR);
/*
- * we are collecting results sent by the datanodes, so advance
+ * we are collecting results sent by the Datanodes, so advance
* collections instead of transitions
*/
advance_collection_function(aggstate, peraggstate,
@@ -1816,8 +1816,8 @@ ExecInitAgg(Agg *node, EState *estate, int eflags)
#ifdef PGXC
peraggstate->collectfn_oid = collectfn_oid = aggform->aggcollectfn;
/*
- * For PGXC final and collection functions are used to combine results at coordinator,
- * disable those for data node
+ * For PGXC final and collection functions are used to combine results at Coordinator,
+ * disable those for Datanode
*/
if (IS_PGXC_DATANODE)
{
diff --git a/src/backend/optimizer/path/allpaths.c b/src/backend/optimizer/path/allpaths.c
index f3e28ffc40..3848c332a7 100644
--- a/src/backend/optimizer/path/allpaths.c
+++ b/src/backend/optimizer/path/allpaths.c
@@ -278,7 +278,7 @@ set_plain_rel_pathlist(PlannerInfo *root, RelOptInfo *rel, RangeTblEntry *rte)
#ifdef PGXC
/*
- * If we are on the coordinator, we always want to use
+ * If we are on the Coordinator, we always want to use
* the remote query path unless it is a pg_catalog table
* or a sequence relation.
*/
diff --git a/src/backend/optimizer/plan/createplan.c b/src/backend/optimizer/plan/createplan.c
index 3ff6e33084..918f07fe1f 100644
--- a/src/backend/optimizer/plan/createplan.c
+++ b/src/backend/optimizer/plan/createplan.c
@@ -2630,7 +2630,7 @@ create_remotequery_plan(PlannerInfo *root, Path *best_path,
tlist_is_simple = contains_only_vars(tlist);
/*
- * Construct a Query structure for the query to be fired on the datanodes
+ * Construct a Query structure for the query to be fired on the Datanodes
* and deparse it. Fields not set remain memzero'ed as set by makeNode.
*/
rte = rt_fetch(scan_relid, root->parse->rtable);
@@ -2671,7 +2671,7 @@ create_remotequery_plan(PlannerInfo *root, Path *best_path,
/*
* Change the varno in Var nodes in the targetlist of the query to be shipped to the
- * datanode to 1, to match the rtable in the query. Do the same for Var
+ * Datanode to 1, to match the rtable in the query. Do the same for Var
* nodes in quals.
*/
varlist = list_concat(pull_var_clause((Node *)query->targetList, PVC_RECURSE_PLACEHOLDERS),
@@ -2699,7 +2699,7 @@ create_remotequery_plan(PlannerInfo *root, Path *best_path,
/*
* Before deparsing the query we need to check whether there are any FOR UPDATE/SHARE clauses
- * in the query that we need to propagate to data nodes
+ * in the query that we need to propagate to Datanodes
*/
rmlist = NULL;
if (root->xc_rowMarks != NULL)
@@ -2788,7 +2788,7 @@ create_remotequery_plan(PlannerInfo *root, Path *best_path,
scan_plan->sql_statement = sql.data;
/*
- * If the table distributed by value, check if we can reduce the datanodes
+ * If the table distributed by value, check if we can reduce the Datanodes
* by looking at the qualifiers for this relation
*/
if (IsLocatorDistributedByValue(rel_loc_info->locatorType))
@@ -2798,7 +2798,7 @@ create_remotequery_plan(PlannerInfo *root, Path *best_path,
distcol_expr = pgxc_find_distcol_expr(rtr->rtindex, rel_loc_info->partAttrNum,
query->jointree->quals);
/*
- * If the type of expression used to find the datanode, is not same as
+ * If the type of expression used to find the Datanode, is not same as
* the distribution column type, try casting it. This is same as what
* will happen in case of inserting that type of expression value as the
* distribution column value.
@@ -5715,7 +5715,7 @@ create_remoteinsert_plan(PlannerInfo *root, Plan *topplan)
* Those are the non-junk expressions in target list of parser tree.
* WHERE clause is completed by the other expressions in target tree that have been
* marked as junk during target list rewriting to be able to identify consistently
- * tuples on remote coordinators. This target list is based on the information obtained
+ * tuples on remote Coordinators. This target list is based on the information obtained
* from the inner plan that should be generated by create_remotequery_plan.
*/
Plan *
@@ -6094,7 +6094,7 @@ create_remotedelete_plan(PlannerInfo *root, Plan *topplan)
/*
* create_remotegrouping_plan
* Check if the grouping and aggregates can be pushed down to the
- * datanodes.
+ * Datanodes.
* Right now we can push with following restrictions
* 1. there are plain aggregates (no expressions involving aggregates) and/or
* expressions in group by clauses
@@ -6144,7 +6144,7 @@ create_remotegrouping_plan(PlannerInfo *root, Plan *local_plan)
if (!enable_remotegroup)
return local_plan;
/*
- * We don't push aggregation and grouping to datanodes, in case there are
+ * We don't push aggregation and grouping to Datanodes, in case there are
* windowing aggregates, distinct, having clause or sort clauses.
*/
if (query->hasWindowFuncs ||
@@ -6198,10 +6198,10 @@ create_remotegrouping_plan(PlannerInfo *root, Plan *local_plan)
/*
* If the remote_scan has any quals on it, those need to be executed before
* doing anything. Hence we won't be able to push any aggregates or grouping
- * to the data node.
+ * to the Datanode.
* If it has any SimpleSort in it, then sorting is intended to be applied
* before doing anything. Hence can not push any aggregates or grouping to
- * the data node.
+ * the Datanode.
*/
if (remote_scan->scan.plan.qual || remote_scan->sort)
return local_plan;
@@ -6241,7 +6241,7 @@ create_remotegrouping_plan(PlannerInfo *root, Plan *local_plan)
*/
base_tlist = pgxc_process_grouping_targetlist(root, &(local_plan->targetlist));
/*
- * If can not construct a targetlist shippable to the datanode. Resort to
+ * If can not construct a targetlist shippable to the Datanode. Resort to
* the plan created by grouping_planner()
*/
if (!base_tlist)
@@ -6251,7 +6251,7 @@ create_remotegrouping_plan(PlannerInfo *root, Plan *local_plan)
&local_qual, &remote_qual, &reduce_plan);
/*
* Because of HAVING clause, we can not push the aggregates and GROUP BY
- * clause to the data node. Resort to the plan created by grouping planner.
+ * clause to the Datanode. Resort to the plan created by grouping planner.
*/
if (!reduce_plan)
return local_plan;
@@ -6259,9 +6259,9 @@ create_remotegrouping_plan(PlannerInfo *root, Plan *local_plan)
/*
* We are now ready to create the RemoteQuery node to push the query to
- * datanode.
+ * Datanode.
* 1. Create a remote query node reflecting the query to be pushed to the
- * datanode.
+ * Datanode.
* 2. Modify the Grouping node passed in, to accept the results sent by the
* Datanodes, then group and aggregate them, if needed.
*/
@@ -6469,9 +6469,9 @@ pgxc_locate_grouping_columns(PlannerInfo *root, List *tlist,
/*
* pgxc_add_node_to_grouping_tlist
- * Add the given node to the target list to be sent to the datanode. If it's
+ * Add the given node to the target list to be sent to the Datanode. If it's
* Aggref node, also change the passed in node to point to the Aggref node in
- * the data node's target list
+ * the Datanode's target list
*/
static List *
pgxc_add_node_to_grouping_tlist(List *remote_tlist, Node *expr, Index ressortgroupref)
@@ -6549,20 +6549,20 @@ pgxc_add_node_to_grouping_tlist(List *remote_tlist, Node *expr, Index ressortgro
/*
* pgxc_process_grouping_targetlist
* The function scans the targetlist to check if the we can push anything
- * from the targetlist to the datanode. Following rules govern the choice
- * 1. Either all of the aggregates are pushed to the datanode or none is pushed
+ * from the targetlist to the Datanode. Following rules govern the choice
+ * 1. Either all of the aggregates are pushed to the Datanode or none is pushed
* 2. If there are no aggregates, the targetlist is good to be shipped as is
* 3. If aggregates are involved in expressions, we push the aggregates to the
- * datanodes but not the involving expressions.
+ * Datanodes but not the involving expressions.
*
* The function constructs the targetlist for the query to be pushed to the
- * datanode. It modifies the local targetlist to point to the expressions in
+ * Datanode. It modifies the local targetlist to point to the expressions in
* remote targetlist wherever necessary (e.g. aggregates)
*
* PGXCTODO: we should be careful while pushing the function expressions, it's
* better to push functions like strlen() which can be evaluated at the
- * datanode, but we should avoid pushing functions which can only be evaluated
- * at coordinator.
+ * Datanode, but we should avoid pushing functions which can only be evaluated
+ * at Coordinator.
*/
static List *
pgxc_process_grouping_targetlist(PlannerInfo *root, List **local_tlist)
@@ -6574,8 +6574,8 @@ pgxc_process_grouping_targetlist(PlannerInfo *root, List **local_tlist)
/*
* Walk through the target list and find out whether we can push the
- * aggregates and grouping to datanodes. Also while doing so, create the
- * targetlist for the query to be shipped to the datanode. Adjust the local
+ * aggregates and grouping to Datanodes. Also while doing so, create the
+ * targetlist for the query to be shipped to the Datanode. Adjust the local
* targetlist accordingly.
*/
foreach(temp, *local_tlist)
@@ -6588,8 +6588,8 @@ pgxc_process_grouping_targetlist(PlannerInfo *root, List **local_tlist)
/*
* If the expression is not Aggref but involves aggregates (has Aggref
* nodes in the expression tree, we can not push the entire expression
- * to the datanode, but push those aggregates to the data node, if those
- * aggregates can be evaluated at the data nodes (if is_foreign_expr
+ * to the Datanode, but push those aggregates to the Datanode, if those
+ * aggregates can be evaluated at the Datanodes (if is_foreign_expr
* returns true for entire expression). To evaluate the rest of the
* expression, we need to fetch the values of VARs participating in the
* expression. But, if we include the VARs under the aggregate nodes,
@@ -6598,7 +6598,7 @@ pgxc_process_grouping_targetlist(PlannerInfo *root, List **local_tlist)
* expression tree rooted under Aggref node.
* For example, the original query is
* SELECT sum(val) * val2 FROM tab1 GROUP BY val2;
- * the query pushed to the data node is
+ * the query pushed to the Datanode is
* SELECT sum(val), val2 FROM tab1 GROUP BY val2;
* Notice that, if we include val in the query, it will become invalid.
*/
@@ -6619,7 +6619,7 @@ pgxc_process_grouping_targetlist(PlannerInfo *root, List **local_tlist)
/*
* if there are aggregates involved in the expression, whole expression
- * can not be pushed to the data node. Pick up the aggregates and the
+ * can not be pushed to the Datanode. Pick up the aggregates and the
* VAR nodes not covered by aggregates.
*/
if (context.aggs)
@@ -6636,7 +6636,7 @@ pgxc_process_grouping_targetlist(PlannerInfo *root, List **local_tlist)
/*
* this expression is not going to be pushed as whole, thus other
* clauses won't be able to find out this TLE in the results
- * obtained from data node. Hence can't optimize this query.
+ * obtained from Datanode. Hence can't optimize this query.
*/
if (local_tle->ressortgroupref > 0)
{
@@ -6670,7 +6670,7 @@ pgxc_process_grouping_targetlist(PlannerInfo *root, List **local_tlist)
{
/*
* If local_tlist has changed but we didn't find anything shippable to
- * datanode, we need to restore the local_tlist to original state,
+ * Datanode, we need to restore the local_tlist to original state,
*/
if (orig_local_tlist)
*local_tlist = orig_local_tlist;
@@ -6693,13 +6693,13 @@ pgxc_process_grouping_targetlist(PlannerInfo *root, List **local_tlist)
/*
* pgxc_process_having_clause
* For every expression in the havingQual take following action
- * 1. If it has aggregates, which can be evaluated at the data nodes, add those
+ * 1. If it has aggregates, which can be evaluated at the Datanodes, add those
* aggregates to the targetlist and modify the local aggregate expressions to
- * point to the aggregate expressions being pushed to the data node. Add this
+ * point to the aggregate expressions being pushed to the Datanode. Add this
* expression to the local qual to be evaluated locally.
* 2. If the expression does not have aggregates and the whole expression can be
- * evaluated at the data node, add the expression to the remote qual to be
- * evaluated at the data node.
+ * evaluated at the Datanode, add the expression to the remote qual to be
+ * evaluated at the Datanode.
* 3. If qual contains an expression which can not be evaluated at the data
* node, the parent group plan can not be reduced to a remote_query.
*/
@@ -6805,7 +6805,7 @@ pgxc_set_en_expr(Oid tableoid, Index resultRelationIndex)
* For round robin distributed tables, tuples must be divided equally
* between the nodes.
*
- * For replicated tables, tuple must be inserted in all the data nodes
+ * For replicated tables, tuple must be inserted in all the Datanodes
*
* XXX Need further testing for replicated and round-robin tables
*/
diff --git a/src/backend/optimizer/plan/planner.c b/src/backend/optimizer/plan/planner.c
index 76830b7707..53e0a55fdf 100644
--- a/src/backend/optimizer/plan/planner.c
+++ b/src/backend/optimizer/plan/planner.c
@@ -137,7 +137,7 @@ planner(Query *parse, int cursorOptions, ParamListInfo boundParams)
else
#ifdef PGXC
/*
- * A coordinator receiving a query from another Coordinator
+ * A Coordinator receiving a query from another Coordinator
* is not allowed to go into PGXC planner.
*/
if (IS_PGXC_COORDINATOR && !IsConnFromCoord())
@@ -267,7 +267,7 @@ standard_planner(Query *parse, int cursorOptions, ParamListInfo boundParams)
#ifdef PGXC
/*
- * PGXC should apply INSERT/UPDATE/DELETE to a datanode. We are overriding
+ * PGXC should apply INSERT/UPDATE/DELETE to a Datanode. We are overriding
* normal Postgres behavior by modifying final plan or by adding a node on
* top of it.
* If the optimizer finds out that there is nothing to UPDATE/INSERT/DELETE
@@ -453,17 +453,17 @@ subquery_planner(PlannerGlobal *glob, Query *parse,
#ifdef PGXC
/*
- * In coordinators we separate row marks in two groups
+ * In Coordinators we separate row marks in two groups
* one comprises of row marks of types ROW_MARK_EXCLUSIVE & ROW_MARK_SHARE
* and the other contains the rest of the types of row marks
- * The former is handeled on coordinator in such a way that
+ * The former is handeled on Coordinator in such a way that
* FOR UPDATE/SHARE gets added in the remote query, whereas
* the later needs to be handeled the way pg does
*
* PGXCTODO : This is not a very efficient way of handling row marks
* Consider this join query
* select * from t1, t2 where t1.val = t2.val for update
- * It results in this query to be fired at the data nodes
+ * It results in this query to be fired at the Datanodes
* SELECT val, val2, ctid FROM ONLY t2 WHERE true FOR UPDATE OF t2
* We are locking the complete table where as we should have locked
* only the rows where t1.val = t2.val is met
@@ -1509,9 +1509,9 @@ grouping_planner(PlannerInfo *root, double tuple_fraction)
#ifdef PGXC
/*
* Grouping will certainly not increase the number of rows
- * coordinator fetches from datanode, in fact it's expected to
+ * Coordinator fetches from Datanode, in fact it's expected to
* reduce the number drastically. Hence, try pushing GROUP BY
- * clauses and aggregates to the datanode, thus saving bandwidth.
+ * clauses and aggregates to the Datanode, thus saving bandwidth.
*/
if (IS_PGXC_COORDINATOR && !IsConnFromCoord())
result_plan = create_remotegrouping_plan(root, result_plan);
@@ -2018,7 +2018,7 @@ preprocess_rowmarks(PlannerInfo *root)
#ifdef PGXC
/*
- * separate_rowmarks - In XC coordinators are supposed to skip handling
+ * separate_rowmarks - In XC Coordinators are supposed to skip handling
* of type ROW_MARK_EXCLUSIVE & ROW_MARK_SHARE.
* In order to do that we simply remove such type
* of row marks from the list. Instead they are saved
diff --git a/src/backend/parser/analyze.c b/src/backend/parser/analyze.c
index 1e931abe03..7f39bc7d72 100644
--- a/src/backend/parser/analyze.c
+++ b/src/backend/parser/analyze.c
@@ -2308,10 +2308,10 @@ transformExplainStmt(ParseState *pstate, ExplainStmt *stmt)
* transformExecDirectStmt -
* transform an EXECUTE DIRECT Statement
*
- * Handling is depends if we should execute on nodes or on coordinator.
+ * Handling is depends if we should execute on nodes or on Coordinator.
* To execute on nodes we return CMD_UTILITY query having one T_RemoteQuery node
* with the inner statement as a sql_command.
- * If statement is to run on coordinator we should parse inner statement and
+ * If statement is to run on Coordinator we should parse inner statement and
* analyze resulting query tree.
*/
static Query *
diff --git a/src/backend/parser/parse_agg.c b/src/backend/parser/parse_agg.c
index 6fe3945af1..33f8b3ac36 100644
--- a/src/backend/parser/parse_agg.c
+++ b/src/backend/parser/parse_agg.c
@@ -194,9 +194,9 @@ transformAggregateCall(ParseState *pstate, Aggref *agg,
pstate->p_hasAggs = true;
#ifdef PGXC
/*
- * Return data type of PGXC datanode's aggregate should always return the
+ * Return data type of PGXC Datanode's aggregate should always return the
* result of transition function, that is expected by collection function
- * on the coordinator.
+ * on the Coordinator.
* Look up the aggregate definition and replace agg->aggtype
*/
diff --git a/src/backend/pgxc/barrier/barrier.c b/src/backend/pgxc/barrier/barrier.c
index 4aaeb230ba..5a3c14c198 100644
--- a/src/backend/pgxc/barrier/barrier.c
+++ b/src/backend/pgxc/barrier/barrier.c
@@ -36,7 +36,7 @@ static void EndBarrier(PGXCNodeAllHandles *handles, const char *id);
* Prepare ourselves for an incoming BARRIER. We must disable all new 2PC
* commits and let the ongoing commits to finish. We then remember the
* barrier id (so that it can be matched with the final END message) and
- * tell the driving coordinator to proceed with the next step.
+ * tell the driving Coordinator to proceed with the next step.
*
* A simple way to implement this is to grab a lock in an exclusive mode
* while all other backend starting a 2PC will grab the lock in shared
@@ -58,7 +58,7 @@ ProcessCreateBarrierPrepare(const char *id)
ereport(ERROR,
(errcode(ERRCODE_INTERNAL_ERROR),
errmsg("The CREATE BARRIER PREPARE message is expected to "
- "arrive at a coordinator from another coordinator")));
+ "arrive at a Coordinator from another Coordinator")));
LWLockAcquire(BarrierLock, LW_EXCLUSIVE);
@@ -86,7 +86,7 @@ ProcessCreateBarrierEnd(const char *id)
ereport(ERROR,
(errcode(ERRCODE_INTERNAL_ERROR),
errmsg("The CREATE BARRIER END message is expected to "
- "arrive at a coordinator from another coordinator")));
+ "arrive at a Coordinator from another Coordinator")));
LWLockRelease(BarrierLock);
@@ -114,7 +114,7 @@ ProcessCreateBarrierExecute(const char *id)
ereport(ERROR,
(errcode(ERRCODE_INTERNAL_ERROR),
errmsg("The CREATE BARRIER EXECUTE message is expected to "
- "arrive from a coordinator")));
+ "arrive from a Coordinator")));
{
XLogRecData rdata[1];
XLogRecPtr recptr;
@@ -143,7 +143,7 @@ generate_barrier_id(const char *id)
/*
* If the caller can passed a NULL value, generate an id which is
* guaranteed to be unique across the cluster. We use a combination of
- * the coordinator node id and current timestamp.
+ * the Coordinator node id and current timestamp.
*/
if (id)
@@ -252,7 +252,7 @@ SendBarrierEndRequest(PGXCNodeAllHandles *coord_handles, const char *id)
int msglen;
int barrier_idlen;
- elog(DEBUG2, "Sending CREATE BARRIER <%s> END command to all coordinators", id);
+ elog(DEBUG2, "Sending CREATE BARRIER <%s> END command to all Coordinators", id);
for (conn = 0; conn < coord_handles->co_conn_count; conn++)
{
@@ -296,10 +296,10 @@ SendBarrierEndRequest(PGXCNodeAllHandles *coord_handles, const char *id)
}
/*
- * Prepare all coordinators for barrier. During this step all the coordinators
- * are informed to suspend any new 2PC transactions. The coordinators should
+ * Prepare all Coordinators for barrier. During this step all the Coordinators
+ * are informed to suspend any new 2PC transactions. The Coordinators should
* disable new 2PC transactions and then wait for the existing transactions to
- * complete. Once all "in-flight" 2PC transactions are over, the coordinators
+ * complete. Once all "in-flight" 2PC transactions are over, the Coordinators
* respond back.
*
* That completes the first step in barrier generation
@@ -311,12 +311,12 @@ PrepareBarrier(const char *id)
{
PGXCNodeAllHandles *coord_handles;
- elog(DEBUG2, "Preparing coordinators for BARRIER");
+ elog(DEBUG2, "Preparing Coordinators for BARRIER");
/*
- * Send a CREATE BARRIER PREPARE message to all the coordinators. We should
+ * Send a CREATE BARRIER PREPARE message to all the Coordinators. We should
* send an asynchronous request so that we can disable local commits and
- * then wait for the remote coordinators to finish the work
+ * then wait for the remote Coordinators to finish the work
*/
coord_handles = SendBarrierPrepareRequest(GetAllCoordNodes(), id);
@@ -325,7 +325,7 @@ PrepareBarrier(const char *id)
*/
LWLockAcquire(BarrierLock, LW_EXCLUSIVE);
- elog(DEBUG2, "Disabled 2PC commits originating at the driving coordinator");
+ elog(DEBUG2, "Disabled 2PC commits originating at the driving Coordinator");
/*
* TODO Start a timer to cancel the barrier request in case of a timeout
@@ -333,7 +333,7 @@ PrepareBarrier(const char *id)
/*
* Local in-flight commits are now over. Check status of the remote
- * coordinators
+ * Coordinators
*/
CheckBarrierCommandStatus(coord_handles, id, "PREPARE");
@@ -341,8 +341,8 @@ PrepareBarrier(const char *id)
}
/*
- * Execute the barrier command on all the components, including data nodes and
- * coordinators.
+ * Execute the barrier command on all the components, including Datanodes and
+ * Coordinators.
*/
static void
ExecuteBarrier(const char *id)
@@ -357,9 +357,9 @@ ExecuteBarrier(const char *id)
conn_handles = get_handles(barrierDataNodeList, barrierCoordList, false);
elog(DEBUG2, "Sending CREATE BARRIER <%s> EXECUTE message to "
- "data nodes and coordinator", id);
+ "Datanodes and Coordinator", id);
/*
- * Send a CREATE BARRIER request to all the data nodes and the coordinators
+ * Send a CREATE BARRIER request to all the Datanodes and the Coordinators
*/
for (conn = 0; conn < conn_handles->co_conn_count + conn_handles->dn_conn_count; conn++)
{
@@ -427,7 +427,7 @@ ExecuteBarrier(const char *id)
}
/*
- * Resume 2PC commits on the local as well as remote coordinators.
+ * Resume 2PC commits on the local as well as remote Coordinators.
*/
static void
EndBarrier(PGXCNodeAllHandles *prepared_handles, const char *id)
@@ -448,18 +448,18 @@ RequestBarrier(const char *id, char *completionTag)
elog(DEBUG2, "CREATE BARRIER request received");
/*
- * Ensure that we are a coordinator and the request is not from another
+ * Ensure that we are a Coordinator and the request is not from another
* coordinator
*/
if (!IS_PGXC_COORDINATOR)
ereport(ERROR,
(errcode(ERRCODE_INTERNAL_ERROR),
- errmsg("CREATE BARRIER command must be sent to a coordinator")));
+ errmsg("CREATE BARRIER command must be sent to a Coordinator")));
if (IsConnFromCoord())
ereport(ERROR,
(errcode(ERRCODE_INTERNAL_ERROR),
- errmsg("CREATE BARRIER command is not expected from another coordinator")));
+ errmsg("CREATE BARRIER command is not expected from another Coordinator")));
/*
* Get a barrier id if the user has not supplied it
@@ -469,18 +469,18 @@ RequestBarrier(const char *id, char *completionTag)
elog(DEBUG2, "CREATE BARRIER <%s>", barrier_id);
/*
- * Step One. Prepare all coordinators for upcoming barrier request
+ * Step One. Prepare all Coordinators for upcoming barrier request
*/
prepared_handles = PrepareBarrier(barrier_id);
/*
* Step two. Issue BARRIER command to all involved components, including
- * coordinators and data nodes
+ * Coordinators and Datanodes
*/
ExecuteBarrier(barrier_id);
/*
- * Step three. Inform coordinators about a successfully completed barrier
+ * Step three. Inform Coordinators about a successfully completed barrier
*/
EndBarrier(prepared_handles, barrier_id);
diff --git a/src/backend/pgxc/locator/locator.c b/src/backend/pgxc/locator/locator.c
index 190b49ed5b..a6d1d287de 100644
--- a/src/backend/pgxc/locator/locator.c
+++ b/src/backend/pgxc/locator/locator.c
@@ -117,7 +117,7 @@ static const unsigned int xc_mod_r[][6] =
/*
* GetAnyDataNode
- * Pick any data node from given list, but try a preferred node
+ * Pick any Datanode from given list, but try a preferred node
*/
List *
GetAnyDataNode(List *relNodes)
@@ -741,7 +741,7 @@ GetAllCoordNodes(void)
{
/*
* Do not put in list the Coordinator we are on,
- * it doesn't make sense to connect to the local coordinator.
+ * it doesn't make sense to connect to the local Coordinator.
*/
if (i != PGXCNodeId - 1)
diff --git a/src/backend/pgxc/nodemgr/nodemgr.c b/src/backend/pgxc/nodemgr/nodemgr.c
index 3d60426324..8a28486b5c 100644
--- a/src/backend/pgxc/nodemgr/nodemgr.c
+++ b/src/backend/pgxc/nodemgr/nodemgr.c
@@ -85,7 +85,7 @@ NodeTablesShmemInit(void)
if (!found)
*shmemNumCoords = 0;
- /* Same for datanodes */
+ /* Same for Datanodes */
shmemNumDataNodes = ShmemInitStruct("Datanode Table",
sizeof(int) +
sizeof(NodeDefinition) * MaxDataNodes,
@@ -439,7 +439,7 @@ PgxcNodeGetDefinition(Oid node)
LWLockAcquire(NodeTableLock, LW_SHARED);
- /* search through the data nodes first */
+ /* search through the Datanodes first */
for (i = 0; i < *shmemNumDataNodes; i++)
{
if (dnDefs[i].nodeoid == node)
diff --git a/src/backend/pgxc/plan/planner.c b/src/backend/pgxc/plan/planner.c
index 00e2c38433..59bfa14152 100644
--- a/src/backend/pgxc/plan/planner.c
+++ b/src/backend/pgxc/plan/planner.c
@@ -403,12 +403,12 @@ fetch_ctid_of(Plan *subtree, Query *query)
* Build up a QueryPlan to execute on.
*
* This functions tries to find out whether
- * 1. The statement can be shipped to the datanode and coordinator is needed
+ * 1. The statement can be shipped to the Datanode and Coordinator is needed
* only as a proxy - in which case, it creates a single node plan.
- * 2. The statement can be evaluated on the coordinator completely - thus no
+ * 2. The statement can be evaluated on the Coordinator completely - thus no
* query shipping is involved and standard_planner() is invoked to plan the
* statement
- * 3. The statement needs coordinator as well as datanode for evaluation -
+ * 3. The statement needs Coordinator as well as Datanode for evaluation -
* again we use standard_planner() to plan the statement.
*
* The plan generated in either of the above cases is returned.
@@ -430,7 +430,7 @@ pgxc_planner(Query *query, int cursorOptions, ParamListInfo boundParams)
if (result)
return result;
- /* we need coordinator for evaluation, invoke standard planner */
+ /* we need Coordinator for evaluation, invoke standard planner */
result = standard_planner(query, cursorOptions, boundParams);
return result;
}
@@ -444,13 +444,13 @@ pgxc_handle_exec_direct(Query *query, int cursorOptions,
PlannerInfo *root;
/*
* if the query has its utility set, it could be an EXEC_DIRECT statement,
- * check if it needs to be executed on coordinator
+ * check if it needs to be executed on Coordinator
*/
if (query->utilityStmt &&
IsA(query->utilityStmt, RemoteQuery))
{
RemoteQuery *node = (RemoteQuery *)query->utilityStmt;
- /* EXECUTE DIRECT statements on remote nodes don't need coordinator */
+ /* EXECUTE DIRECT statements on remote nodes don't need Coordinator */
if (node->exec_direct_type != EXEC_DIRECT_NONE &&
node->exec_direct_type != EXEC_DIRECT_LOCAL &&
node->exec_direct_type != EXEC_DIRECT_LOCAL_UTILITY)
@@ -514,23 +514,23 @@ pgxc_handle_unsupported_stmts(Query *query)
/*
* pgxc_FQS_planner
* The routine tries to see if the statement can be completely evaluated on the
- * datanodes. In such cases coordinator is not needed to evaluate the statement,
+ * Datanodes. In such cases Coordinator is not needed to evaluate the statement,
* and just acts as a proxy. A statement can be completely shipped to the remote
- * node if every row of the result can be evaluated on a single datanode.
+ * node if every row of the result can be evaluated on a single Datanode.
* For example:
*
* 1. SELECT * FROM tab1; where tab1 is a distributed table - Every row of the
- * result set can be evaluated at a single datanode. Hence this statement is
- * completely shippable even though many datanodes are involved in evaluating
- * complete result set. In such case coordinator will be able to gather rows
- * arisign from individual datanodes and proxy the result to the client.
+ * result set can be evaluated at a single Datanode. Hence this statement is
+ * completely shippable even though many Datanodes are involved in evaluating
+ * complete result set. In such case Coordinator will be able to gather rows
+ * arisign from individual Datanodes and proxy the result to the client.
*
* 2. SELECT count(*) FROM tab1; where tab1 is a distributed table - there is
- * only one row in the result but it needs input from all the datanodes. Hence
+ * only one row in the result but it needs input from all the Datanodes. Hence
* this is not completely shippable.
*
* 3. SELECT count(*) FROM tab1; where tab1 is replicated table - since result
- * can be obtained from a single datanode, this is a completely shippable
+ * can be obtained from a single Datanode, this is a completely shippable
* statement.
*
* fqs in the name of function is acronym for fast query shipping.
@@ -553,7 +553,7 @@ pgxc_FQS_planner(Query *query, int cursorOptions, ParamListInfo boundParams)
IsA(query->utilityStmt, DeclareCursorStmt))
cursorOptions |= ((DeclareCursorStmt *) query->utilityStmt)->options;
/*
- * If the query can not be or need not be shipped to the datanodes, don't
+ * If the query can not be or need not be shipped to the Datanodes, don't
* create any plan here. standard_planner() will take care of it.
*/
exec_nodes = pgxc_is_query_shippable(query, 0);
@@ -570,7 +570,7 @@ pgxc_FQS_planner(Query *query, int cursorOptions, ParamListInfo boundParams)
root->planner_cxt = CurrentMemoryContext;
/*
- * We decided to ship the query to the datanode/s, create a RemoteQuery node
+ * We decided to ship the query to the Datanode/s, create a RemoteQuery node
* for the same.
*/
top_plan = (Plan *)pgxc_FQS_create_remote_plan(query, exec_nodes, false);
@@ -654,7 +654,7 @@ pgxc_FQS_create_remote_plan(Query *query, ExecNodes *exec_nodes, bool is_exec_di
}
/*
* PGXCTODO: we may route this same Query structure through
- * standard_planner, where we don't want datanodes to finalise the results.
+ * standard_planner, where we don't want Datanodes to finalise the results.
* Turn it off. At some point, we will avoid routing the same query
* structure through the standard_planner by modifying it only when it's not
* be routed through standard_planner.
@@ -675,7 +675,7 @@ pgxc_FQS_create_remote_plan(Query *query, ExecNodes *exec_nodes, bool is_exec_di
/*
* We need to evaluate some expressions like the ExecNodes->en_expr at
- * coordinator, prepare those for evaluation. Ideally we should call
+ * Coordinator, prepare those for evaluation. Ideally we should call
* preprocess_expression, but it needs PlannerInfo structure for the same
*/
fix_opfuncids((Node *)(query_step->exec_nodes->en_expr));
@@ -722,22 +722,22 @@ pgxc_FQS_create_remote_plan(Query *query, ExecNodes *exec_nodes, bool is_exec_di
/*
* pgxc_query_needs_coord
- * Check if the query needs coordinator for evaluation or it can be completely
- * evaluated on coordinator. Return true if so, otherwise return false.
+ * Check if the query needs Coordinator for evaluation or it can be completely
+ * evaluated on Coordinator. Return true if so, otherwise return false.
*/
static bool
pgxc_query_needs_coord(Query *query)
{
/*
- * If the query is an EXEC DIRECT on the same coordinator where it's fired,
+ * If the query is an EXEC DIRECT on the same Coordinator where it's fired,
* it should not be shipped
*/
if (query->is_local)
return true;
/*
* If the query involves just the catalog tables, and is not an EXEC DIRECT
- * statement, it can be evaluated completely on the coordinator. No need to
- * involve datanodes.
+ * statement, it can be evaluated completely on the Coordinator. No need to
+ * involve Datanodes.
*/
if (contains_only_pg_catalog(query->rtable))
return true;
@@ -762,7 +762,7 @@ pgxc_query_needs_coord(Query *query)
/*
* Set the given reason in FQS_context indicating why the query can not be
- * shipped directly to the datanodes.
+ * shipped directly to the Datanodes.
*/
static void
pgxc_FQS_set_reason(FQS_context *context, FQS_shippability reason)
@@ -772,7 +772,7 @@ pgxc_FQS_set_reason(FQS_context *context, FQS_shippability reason)
/*
* See if a given reason is why the query can not be shipped directly
- * to the datanodes.
+ * to the Datanodes.
*/
static bool
pgxc_FQS_test_reason(FQS_context *context, FQS_shippability reason)
@@ -786,7 +786,7 @@ pgxc_FQS_test_reason(FQS_context *context, FQS_shippability reason)
* information like Constraints under which the query can be shippable, nodes
* on which the query is going to be executed etc.
* Based on the information gathered, it decides whether the query can be
- * executed on datanodes directly without involving coordinator.
+ * executed on Datanodes directly without involving Coordinator.
* If the query is shippable this routine also returns the nodes where the query
* should be shipped. If the query is not shippable, it returns NULL.
*/
@@ -804,7 +804,7 @@ pgxc_is_query_shippable(Query *query, int query_level)
fqs_context.fqsc_query_level = query_level;
/*
- * We might have already decided not to ship the query to the datanodes, but
+ * We might have already decided not to ship the query to the Datanodes, but
* still walk it anyway to find out if there are any subqueries which can be
* shipped.
*/
@@ -827,11 +827,11 @@ pgxc_is_query_shippable(Query *query, int query_level)
/*
* Look at the information gathered by the walker in FQS_context and that
* in the Query structure to decide whether we should ship this query
- * directly to the datanode or not
+ * directly to the Datanode or not
*/
/*
- * If the planner was not able to find the datanodes to the execute the
+ * If the planner was not able to find the Datanodes to the execute the
* query, the query is not completely shippable. So, return NULL
*/
if (!exec_nodes)
@@ -1039,10 +1039,10 @@ pgxc_FQS_find_datanodes(FQS_context *fqs_context)
/*
* For every range table entry,
- * 1. Find out the datanodes needed for that range table
- * 2. Merge these datanodes with the already available datanodes
+ * 1. Find out the Datanodes needed for that range table
+ * 2. Merge these Datanodes with the already available Datanodes
* 3. If the merge is unsuccessful, we can not ship this query directly to
- * the datanode/s
+ * the Datanode/s
*/
foreach(rt, query->rtable)
{
@@ -1060,10 +1060,10 @@ pgxc_FQS_find_datanodes(FQS_context *fqs_context)
bool merge_dist_equijoin = false;
/*
* In case of inheritance, child tables can have completely different
- * datanode distribution than parent. To handle inheritance we need
- * to merge the datanodes of the children table as well. The inheritance
+ * Datanode distribution than parent. To handle inheritance we need
+ * to merge the Datanodes of the children table as well. The inheritance
* is resolved during planning(?), so we may not have the RTEs of the
- * children here. Also, the exact method of merging datanodes of the
+ * children here. Also, the exact method of merging Datanodes of the
* children is not known yet. So, when inheritance is requested, query
* can not be shipped.
*/
@@ -1165,7 +1165,7 @@ pgxc_FQS_find_datanodes(FQS_context *fqs_context)
}
/*
- * If we didn't find the datanodes to ship the query to, we shouldn't ship
+ * If we didn't find the Datanodes to ship the query to, we shouldn't ship
* the query :)
*/
if (!exec_nodes || !(exec_nodes->nodeList || exec_nodes->en_expr))
@@ -1256,7 +1256,7 @@ pgxc_qual_hash_dist_equijoin(Relids varnos_1, Relids varnos_2, Oid distcol_type,
* If the data types of both the columns are not same, continue. Hash
* and Modulo of a the same bytes will be same if the data types are
* same. So, only when the data types of the columns are same, we can
- * ship a distributed JOIN to the datanodes
+ * ship a distributed JOIN to the Datanodes
*/
if (exprType((Node *)lvar) != exprType((Node *)rvar))
continue;
@@ -1401,7 +1401,7 @@ static bool VarAttrIsPartAttr(Var *var, List *rtable)
}
/*
* pgxc_FQS_get_relation_nodes
- * For FQS return ExecNodes structure so as to decide which datanodes the query
+ * For FQS return ExecNodes structure so as to decide which Datanodes the query
* should execute on. If it is possible to set the node list directly, set it.
* Otherwise set the appropriate distribution column expression or relid in
* ExecNodes structure.
@@ -1451,7 +1451,7 @@ pgxc_FQS_get_relation_nodes(RangeTblEntry *rte, Index varno, Query *query)
return NULL;
/*
- * If the table distributed by value, check if we can reduce the datanodes
+ * If the table distributed by value, check if we can reduce the Datanodes
* by looking at the qualifiers for this relation.
* PGXC_FQS_TODO: for now, we apply node reduction only when there is only
* one relation involved in the query. If there are multiple distributed
@@ -1466,7 +1466,7 @@ pgxc_FQS_get_relation_nodes(RangeTblEntry *rte, Index varno, Query *query)
distcol_expr = pgxc_find_distcol_expr(varno, rel_loc_info->partAttrNum,
query->jointree->quals);
/*
- * If the type of expression used to find the datanode, is not same as
+ * If the type of expression used to find the Datanode, is not same as
* the distribution column type, try casting it. This is same as what
* will happen in case of inserting that type of expression value as the
* distribution column value.
@@ -1513,7 +1513,7 @@ pgxc_FQS_get_relation_nodes(RangeTblEntry *rte, Index varno, Query *query)
/*
* If we are reading a replicated table, pick all the nodes where it
* resides. If the query has JOIN, it helps picking up a matching set of
- * datanodes for that JOIN. FQS planner will ultimately pick up one node if
+ * Datanodes for that JOIN. FQS planner will ultimately pick up one node if
* the JOIN is replicated.
*/
if (rel_access == RELATION_ACCESS_READ &&
@@ -1563,12 +1563,12 @@ pgxc_FQS_get_relation_nodes(RangeTblEntry *rte, Index varno, Query *query)
* pgxc_FQS_walker
* walks the query/expression tree routed at the node passed in, gathering
* information which will help decide whether the query to which this node
- * belongs is shippable to the datanodes.
+ * belongs is shippable to the Datanodes.
*
* The function should try to walk the entire tree analysing each subquery for
* shippability. If a subquery is shippable but not the whole query, we would be
* able to create a RemoteQuery node for that subquery, shipping it to the
- * datanode.
+ * Datanode.
*
* Return value of this function is governed by the same rules as
* expression_tree_walker(), see prologue of that function for details.
@@ -1656,9 +1656,9 @@ pgxc_FQS_walker(Node *node, FQS_context *fqs_context)
case T_SetToDefault:
/*
* PGXCTODO: we should actually check whether the default value to
- * be substituted is shippable to the datanode. Some cases like
- * nextval() of a sequence can not be shipped to the datanode, hence
- * for now default values can not be shipped to the datanodes
+ * be substituted is shippable to the Datanode. Some cases like
+ * nextval() of a sequence can not be shipped to the Datanode, hence
+ * for now default values can not be shipped to the Datanodes
*/
pgxc_FQS_set_reason(fqs_context, FQS_UNSUPPORTED_EXPR);
break;
@@ -1702,8 +1702,8 @@ pgxc_FQS_walker(Node *node, FQS_context *fqs_context)
case T_Aggref:
{
/*
- * An aggregate is completely shippable to the datanode, if the
- * whole group resides on that datanode. This will be clear when
+ * An aggregate is completely shippable to the Datanode, if the
+ * whole group resides on that Datanode. This will be clear when
* we see the GROUP BY clause.
* Query::hasAggs will tell that the query has aggregates.
* agglevelsup is minimum of variable's varlevelsup, so we will
@@ -1719,8 +1719,8 @@ pgxc_FQS_walker(Node *node, FQS_context *fqs_context)
FuncExpr *funcexpr = (FuncExpr *)node;
/*
* PGXC_FQS_TODO: it's too restrictive not to ship non-immutable
- * functions to the datanode. We need a better way to see what
- * can be shipped to the datanode and what can not be.
+ * functions to the Datanode. We need a better way to see what
+ * can be shipped to the Datanode and what can not be.
*/
if (!is_immutable_func(funcexpr->funcid))
pgxc_FQS_set_reason(fqs_context, FQS_UNSHIPPABLE_EXPR);
@@ -1747,7 +1747,7 @@ pgxc_FQS_walker(Node *node, FQS_context *fqs_context)
case T_ScalarArrayOpExpr:
{
/*
- * Check if the operator function is shippable to the datanode
+ * Check if the operator function is shippable to the Datanode
* PGXC_FQS_TODO: see immutability note for FuncExpr above
*/
ScalarArrayOpExpr *sao_expr = (ScalarArrayOpExpr *)node;
@@ -1778,15 +1778,15 @@ pgxc_FQS_walker(Node *node, FQS_context *fqs_context)
if (query->hasRecursive || query->intoClause)
pgxc_FQS_set_reason(fqs_context, FQS_UNSUPPORTED_EXPR);
/*
- * If the query needs coordinator for evaluation or the query can be
- * completed on coordinator itself, we don't ship it to the datanode
+ * If the query needs Coordinator for evaluation or the query can be
+ * completed on Coordinator itself, we don't ship it to the Datanode
*/
if (pgxc_query_needs_coord(query))
pgxc_FQS_set_reason(fqs_context, FQS_NEEDS_COORD);
/* PGXC_FQS_TODO: It should be possible to look at the Query and find out
- * whether it can be completely evaluated on the datanode just like SELECT
- * queries. But we need to be careful while finding out the datanodes to
+ * whether it can be completely evaluated on the Datanode just like SELECT
+ * queries. But we need to be careful while finding out the Datanodes to
* execute the query on, esp. for the result relations. If one happens to
* remove/change this restriction, make sure you change
* pgxc_FQS_get_relation_nodes appropriately.
@@ -1797,7 +1797,7 @@ pgxc_FQS_walker(Node *node, FQS_context *fqs_context)
/*
* In following conditions query is shippable when there is only one
- * datanode involved
+ * Datanode involved
* 1. the query has aggregagtes
* 2. the query has window functions
* 3. the query has ORDER BY clause
@@ -1805,12 +1805,12 @@ pgxc_FQS_walker(Node *node, FQS_context *fqs_context)
* 5. the query has limit and offset clause
*
* PGXC_FQS_TODO: Condition 1 above is really dependent upon the GROUP BY clause. If
- * all rows in each group reside on the same datanode, aggregates can be
- * evaluated on that datanode, thus condition 1 is has aggregates & the rows
- * in any group reside on multiple datanodes.
+ * all rows in each group reside on the same Datanode, aggregates can be
+ * evaluated on that Datanode, thus condition 1 is has aggregates & the rows
+ * in any group reside on multiple Datanodes.
* PGXC_FQS_TODO: Condition 2 above is really dependent upon whether the distinct
* clause has distribution column in it. If the distinct clause has
- * distribution column in it, we can ship DISTINCT clause to the datanodes.
+ * distribution column in it, we can ship DISTINCT clause to the Datanodes.
*/
if (query->hasAggs || query->hasWindowFuncs || query->sortClause ||
query->distinctClause || query->groupClause || query->havingQual ||
@@ -1832,7 +1832,7 @@ pgxc_FQS_walker(Node *node, FQS_context *fqs_context)
/*
* Walk the RangeTableEntries of the query and find the
- * datanodes needed for evaluating this query
+ * Datanodes needed for evaluating this query
*/
pgxc_FQS_find_datanodes(fqs_context);
}
@@ -1858,8 +1858,8 @@ pgxc_FQS_walker(Node *node, FQS_context *fqs_context)
{
WindowFunc *winf = (WindowFunc *)node;
/*
- * A window function can be evaluated on a datanode if there is
- * only one datanode involved. This can be checked outside the
+ * A window function can be evaluated on a Datanode if there is
+ * only one Datanode involved. This can be checked outside the
* walker by looking at Query::hasWindowFuncs.
*/
if (!is_immutable_func(winf->winfnoid))
@@ -1870,8 +1870,8 @@ pgxc_FQS_walker(Node *node, FQS_context *fqs_context)
/* Nodes which do not need to be examined but worth some explanation */
case T_WindowClause:
/*
- * A window function can be evaluated on a datanode if there is
- * only one datanode involved. This can be checked outside the
+ * A window function can be evaluated on a Datanode if there is
+ * only one Datanode involved. This can be checked outside the
* walker by looking at Query::hasWindowFuncs.
*/
/* FALL THROUGH */
diff --git a/src/backend/pgxc/pool/execRemote.c b/src/backend/pgxc/pool/execRemote.c
index c4e13b5a38..3bae9570d0 100644
--- a/src/backend/pgxc/pool/execRemote.c
+++ b/src/backend/pgxc/pool/execRemote.c
@@ -2,7 +2,7 @@
*
* execRemote.c
*
- * Functions to execute commands on remote data nodes
+ * Functions to execute commands on remote Datanodes
*
*
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
@@ -388,7 +388,7 @@ create_tuple_desc(char *msg_body, size_t len)
}
/*
- * Handle CopyOutCommandComplete ('c') message from a data node connection
+ * Handle CopyOutCommandComplete ('c') message from a Datanode connection
*/
static void
HandleCopyOutComplete(RemoteQueryState *combiner)
@@ -399,13 +399,13 @@ HandleCopyOutComplete(RemoteQueryState *combiner)
/* Inconsistent responses */
ereport(ERROR,
(errcode(ERRCODE_DATA_CORRUPTED),
- errmsg("Unexpected response from the data nodes for 'c' message, current request type %d", combiner->request_type)));
- /* Just do nothing, close message is managed by the coordinator */
+ errmsg("Unexpected response from the Datanodes for 'c' message, current request type %d", combiner->request_type)));
+ /* Just do nothing, close message is managed by the Coordinator */
combiner->copy_out_count++;
}
/*
- * Handle CommandComplete ('C') message from a data node connection
+ * Handle CommandComplete ('C') message from a Datanode connection
*/
static void
HandleCommandComplete(RemoteQueryState *combiner, char *msg_body, size_t len, PGXCNodeHandle *conn)
@@ -434,7 +434,7 @@ HandleCommandComplete(RemoteQueryState *combiner, char *msg_body, size_t len, PG
/* There is a consistency issue in the database with the replicated table */
ereport(ERROR,
(errcode(ERRCODE_DATA_CORRUPTED),
- errmsg("Write to replicated table returned different results from the data nodes")));
+ errmsg("Write to replicated table returned different results from the Datanodes")));
}
else
/* first result */
@@ -463,7 +463,7 @@ HandleCommandComplete(RemoteQueryState *combiner, char *msg_body, size_t len, PG
}
/*
- * Handle RowDescription ('T') message from a data node connection
+ * Handle RowDescription ('T') message from a Datanode connection
*/
static bool
HandleRowDescription(RemoteQueryState *combiner, char *msg_body, size_t len)
@@ -475,7 +475,7 @@ HandleRowDescription(RemoteQueryState *combiner, char *msg_body, size_t len)
/* Inconsistent responses */
ereport(ERROR,
(errcode(ERRCODE_DATA_CORRUPTED),
- errmsg("Unexpected response from the data nodes for 'T' message, current request type %d", combiner->request_type)));
+ errmsg("Unexpected response from the Datanodes for 'T' message, current request type %d", combiner->request_type)));
}
/* Increment counter and check if it was first */
if (combiner->description_count++ == 0)
@@ -489,7 +489,7 @@ HandleRowDescription(RemoteQueryState *combiner, char *msg_body, size_t len)
#ifdef NOT_USED
/*
- * Handle ParameterStatus ('S') message from a data node connection (SET command)
+ * Handle ParameterStatus ('S') message from a Datanode connection (SET command)
*/
static void
HandleParameterStatus(RemoteQueryState *combiner, char *msg_body, size_t len)
@@ -501,7 +501,7 @@ HandleParameterStatus(RemoteQueryState *combiner, char *msg_body, size_t len)
/* Inconsistent responses */
ereport(ERROR,
(errcode(ERRCODE_DATA_CORRUPTED),
- errmsg("Unexpected response from the data nodes for 'S' message, current request type %d", combiner->request_type)));
+ errmsg("Unexpected response from the Datanodes for 'S' message, current request type %d", combiner->request_type)));
}
/* Proxy last */
if (++combiner->description_count == combiner->node_count)
@@ -512,7 +512,7 @@ HandleParameterStatus(RemoteQueryState *combiner, char *msg_body, size_t len)
#endif
/*
- * Handle CopyInResponse ('G') message from a data node connection
+ * Handle CopyInResponse ('G') message from a Datanode connection
*/
static void
HandleCopyIn(RemoteQueryState *combiner)
@@ -524,17 +524,17 @@ HandleCopyIn(RemoteQueryState *combiner)
/* Inconsistent responses */
ereport(ERROR,
(errcode(ERRCODE_DATA_CORRUPTED),
- errmsg("Unexpected response from the data nodes for 'G' message, current request type %d", combiner->request_type)));
+ errmsg("Unexpected response from the Datanodes for 'G' message, current request type %d", combiner->request_type)));
}
/*
* The normal PG code will output an G message when it runs in the
- * coordinator, so do not proxy message here, just count it.
+ * Coordinator, so do not proxy message here, just count it.
*/
combiner->copy_in_count++;
}
/*
- * Handle CopyOutResponse ('H') message from a data node connection
+ * Handle CopyOutResponse ('H') message from a Datanode connection
*/
static void
HandleCopyOut(RemoteQueryState *combiner)
@@ -546,17 +546,17 @@ HandleCopyOut(RemoteQueryState *combiner)
/* Inconsistent responses */
ereport(ERROR,
(errcode(ERRCODE_DATA_CORRUPTED),
- errmsg("Unexpected response from the data nodes for 'H' message, current request type %d", combiner->request_type)));
+ errmsg("Unexpected response from the Datanodes for 'H' message, current request type %d", combiner->request_type)));
}
/*
* The normal PG code will output an H message when it runs in the
- * coordinator, so do not proxy message here, just count it.
+ * Coordinator, so do not proxy message here, just count it.
*/
combiner->copy_out_count++;
}
/*
- * Handle CopyOutDataRow ('d') message from a data node connection
+ * Handle CopyOutDataRow ('d') message from a Datanode connection
*/
static void
HandleCopyDataRow(RemoteQueryState *combiner, char *msg_body, size_t len)
@@ -568,7 +568,7 @@ HandleCopyDataRow(RemoteQueryState *combiner, char *msg_body, size_t len)
if (combiner->request_type != REQUEST_TYPE_COPY_OUT)
ereport(ERROR,
(errcode(ERRCODE_DATA_CORRUPTED),
- errmsg("Unexpected response from the data nodes for 'd' message, current request type %d", combiner->request_type)));
+ errmsg("Unexpected response from the Datanodes for 'd' message, current request type %d", combiner->request_type)));
/* count the row */
combiner->processed++;
@@ -582,7 +582,7 @@ HandleCopyDataRow(RemoteQueryState *combiner, char *msg_body, size_t len)
}
/*
- * Handle DataRow ('D') message from a data node connection
+ * Handle DataRow ('D') message from a Datanode connection
* The function returns true if buffer can accept more data rows.
* Caller must stop reading if function returns false
*/
@@ -603,7 +603,7 @@ HandleDataRow(RemoteQueryState *combiner, char *msg_body, size_t len, int nid)
/* Inconsistent responses */
ereport(ERROR,
(errcode(ERRCODE_DATA_CORRUPTED),
- errmsg("Unexpected response from the data nodes for 'D' message, current request type %d", combiner->request_type)));
+ errmsg("Unexpected response from the Datanodes for 'D' message, current request type %d", combiner->request_type)));
}
/*
@@ -624,7 +624,7 @@ HandleDataRow(RemoteQueryState *combiner, char *msg_body, size_t len, int nid)
}
/*
- * Handle ErrorResponse ('E') message from a data node connection
+ * Handle ErrorResponse ('E') message from a Datanode connection
*/
static void
HandleError(RemoteQueryState *combiner, char *msg_body, size_t len)
@@ -694,7 +694,7 @@ HandleError(RemoteQueryState *combiner, char *msg_body, size_t len)
}
/*
- * If data node have sent ErrorResponse it will never send CommandComplete.
+ * If Datanode have sent ErrorResponse it will never send CommandComplete.
* Increment the counter to prevent endless waiting for it.
*/
combiner->command_complete_count++;
@@ -855,12 +855,12 @@ ValidateAndCloseCombiner(RemoteQueryState *combiner)
}
/*
- * It is possible if multiple steps share the same data node connection, when
+ * It is possible if multiple steps share the same Datanode connection, when
* executor is running multi-step query or client is running multiple queries
* using Extended Query Protocol. After returning next tuple ExecRemoteQuery
* function passes execution control to the executor and then it can be given
* to the same RemoteQuery or to different one. It is possible that before
- * returning a tuple the function do not read all data node responses. In this
+ * returning a tuple the function do not read all Datanode responses. In this
* case pending responses should be read in context of original RemoteQueryState
* till ReadyForQuery message and data rows should be stored (buffered) to be
* available when fetch from that RemoteQueryState is requested again.
@@ -897,7 +897,7 @@ BufferConnection(PGXCNodeHandle *conn)
Assert(combiner->current_conn < combiner->conn_count);
/*
- * Buffer data rows until data node return number of rows specified by the
+ * Buffer data rows until Datanode return number of rows specified by the
* fetch_size parameter of last Execute message (PortalSuspended message)
* or end of result set is reached (CommandComplete message)
*/
@@ -905,7 +905,7 @@ BufferConnection(PGXCNodeHandle *conn)
{
int res;
- /* Move to buffer currentRow (received from the data node) */
+ /* Move to buffer currentRow (received from the Datanode) */
if (combiner->currentRow.msg)
{
RemoteDataRow dataRow = (RemoteDataRow) palloc(sizeof(RemoteDataRowData));
@@ -931,7 +931,7 @@ BufferConnection(PGXCNodeHandle *conn)
if (pgxc_node_receive(1, &conn, NULL))
{
conn->state = DN_CONNECTION_STATE_ERROR_FATAL;
- add_error_message(conn, "Failed to fetch from data node");
+ add_error_message(conn, "Failed to fetch from Datanode");
}
}
else if (res == RESPONSE_COMPLETE)
@@ -1046,7 +1046,7 @@ FetchTuple(RemoteQueryState *combiner, TupleTableSlot *slot)
BufferConnection(conn);
/*
- * If current connection is idle it means portal on the data node is
+ * If current connection is idle it means portal on the Datanode is
* suspended. If we have a tuple do not hurry to request more rows,
* leave connection clean for other RemoteQueries.
* If we do not have, request more and try to get it
@@ -1064,15 +1064,15 @@ FetchTuple(RemoteQueryState *combiner, TupleTableSlot *slot)
if (pgxc_node_send_execute(conn, combiner->cursor, 1) != 0)
ereport(ERROR,
(errcode(ERRCODE_INTERNAL_ERROR),
- errmsg("Failed to fetch from data node")));
+ errmsg("Failed to fetch from Datanode")));
if (pgxc_node_send_sync(conn) != 0)
ereport(ERROR,
(errcode(ERRCODE_INTERNAL_ERROR),
- errmsg("Failed to fetch from data node")));
+ errmsg("Failed to fetch from Datanode")));
if (pgxc_node_receive(1, &conn, NULL))
ereport(ERROR,
(errcode(ERRCODE_INTERNAL_ERROR),
- errmsg("Failed to fetch from data node")));
+ errmsg("Failed to fetch from Datanode")));
conn->combiner = combiner;
}
}
@@ -1085,7 +1085,7 @@ FetchTuple(RemoteQueryState *combiner, TupleTableSlot *slot)
if (pgxc_node_receive(1, &conn, NULL))
ereport(ERROR,
(errcode(ERRCODE_INTERNAL_ERROR),
- errmsg("Failed to fetch from data node")));
+ errmsg("Failed to fetch from Datanode")));
continue;
}
else if (res == RESPONSE_SUSPENDED)
@@ -1137,7 +1137,7 @@ FetchTuple(RemoteQueryState *combiner, TupleTableSlot *slot)
/*
- * Handle responses from the Data node connections
+ * Handle responses from the Datanode connections
*/
static int
pgxc_node_receive_responses(const int conn_count, PGXCNodeHandle ** connections,
@@ -1151,7 +1151,7 @@ pgxc_node_receive_responses(const int conn_count, PGXCNodeHandle ** connections,
/*
* Read results.
- * Note we try and read from data node connections even if there is an error on one,
+ * Note we try and read from Datanode connections even if there is an error on one,
* so as to avoid reading incorrect results on the next statement.
* Other safegaurds exist to avoid this, however.
*/
@@ -1179,8 +1179,8 @@ pgxc_node_receive_responses(const int conn_count, PGXCNodeHandle ** connections,
break;
default:
/* Inconsistent responses */
- add_error_message(to_receive[i], "Unexpected response from the data nodes");
- elog(ERROR, "Unexpected response from the data nodes, result = %d, request type %d", result, combiner->request_type);
+ add_error_message(to_receive[i], "Unexpected response from the Datanodes");
+ elog(ERROR, "Unexpected response from the Datanodes, result = %d, request type %d", result, combiner->request_type);
/* Stop tracking and move last connection in place */
count--;
if (i < count)
@@ -1306,7 +1306,7 @@ handle_response(PGXCNodeHandle * conn, RemoteQueryState *combiner)
{
/*
* Return result depends on previous connection state.
- * If it was PORTAL_SUSPENDED coordinator want to send down
+ * If it was PORTAL_SUSPENDED Coordinator want to send down
* another EXECUTE to fetch more rows, otherwise it is done
* with the connection
*/
@@ -1343,7 +1343,7 @@ handle_response(PGXCNodeHandle * conn, RemoteQueryState *combiner)
/*
- * Has the data node sent Ready For Query
+ * Has the Datanode sent Ready For Query
*/
bool
@@ -1381,7 +1381,7 @@ is_data_node_ready(PGXCNodeHandle * conn)
case 'Z': /* ReadyForQuery */
/*
* Return result depends on previous connection state.
- * If it was PORTAL_SUSPENDED coordinator want to send down
+ * If it was PORTAL_SUSPENDED Coordinator want to send down
* another EXECUTE to fetch more rows, otherwise it is done
* with the connection
*/
@@ -1498,9 +1498,9 @@ pgxc_node_begin(int conn_count, PGXCNodeHandle **connections,
* caller should tell us if the node may do any write activitiy
*
* XXX This is a bit tricky since it would be difficult to know if
- * statement has any side effect on the data node. So a SELECT
- * statement may invoke a function on the data node which may end up
- * modifying the data at the data node. We can possibly rely on the
+ * statement has any side effect on the Datanode. So a SELECT
+ * statement may invoke a function on the Datanode which may end up
+ * modifying the data at the Datanode. We can possibly rely on the
* function qualification to decide if a statement is a read-only or a
* read-write statement.
*/
@@ -2072,7 +2072,7 @@ DataNodeCopyBegin(const char *query, List *nodelist, Snapshot snapshot, bool is_
if (conn_count == 0)
return NULL;
- /* Get needed datanode connections */
+ /* Get needed Datanode connections */
pgxc_handles = get_handles(nodelist, NULL, false);
connections = pgxc_handles->datanode_handles;
@@ -2188,11 +2188,11 @@ DataNodeCopyIn(char *data_row, int len, ExecNodes *exec_nodes, PGXCNodeHandle**
/* flush buffer if it is almost full */
if (bytes_needed > COPY_BUFFER_SIZE)
{
- /* First look if data node has sent a error message */
+ /* First look if Datanode has sent a error message */
int read_status = pgxc_node_read_data(primary_handle, true);
if (read_status == EOF || read_status < 0)
{
- add_error_message(primary_handle, "failed to read data from data node");
+ add_error_message(primary_handle, "failed to read data from Datanode");
return EOF;
}
@@ -2209,7 +2209,7 @@ DataNodeCopyIn(char *data_row, int len, ExecNodes *exec_nodes, PGXCNodeHandle**
if (send_some(primary_handle, primary_handle->outEnd) < 0)
{
- add_error_message(primary_handle, "failed to send data to data node");
+ add_error_message(primary_handle, "failed to send data to Datanode");
return EOF;
}
}
@@ -2230,7 +2230,7 @@ DataNodeCopyIn(char *data_row, int len, ExecNodes *exec_nodes, PGXCNodeHandle**
}
else
{
- add_error_message(primary_handle, "Invalid data node connection");
+ add_error_message(primary_handle, "Invalid Datanode connection");
return EOF;
}
}
@@ -2249,11 +2249,11 @@ DataNodeCopyIn(char *data_row, int len, ExecNodes *exec_nodes, PGXCNodeHandle**
{
int to_send = handle->outEnd;
- /* First look if data node has sent a error message */
+ /* First look if Datanode has sent a error message */
int read_status = pgxc_node_read_data(handle, true);
if (read_status == EOF || read_status < 0)
{
- add_error_message(handle, "failed to read data from data node");
+ add_error_message(handle, "failed to read data from Datanode");
return EOF;
}
@@ -2288,7 +2288,7 @@ DataNodeCopyIn(char *data_row, int len, ExecNodes *exec_nodes, PGXCNodeHandle**
*/
if (to_send && send_some(handle, to_send) < 0)
{
- add_error_message(handle, "failed to send data to data node");
+ add_error_message(handle, "failed to send data to Datanode");
return EOF;
}
}
@@ -2309,7 +2309,7 @@ DataNodeCopyIn(char *data_row, int len, ExecNodes *exec_nodes, PGXCNodeHandle**
}
else
{
- add_error_message(handle, "Invalid data node connection");
+ add_error_message(handle, "Invalid Datanode connection");
return EOF;
}
}
@@ -2371,7 +2371,7 @@ DataNodeCopyOut(ExecNodes *exec_nodes, PGXCNodeHandle** copy_connections, FILE*
pfree(copy_connections);
ereport(ERROR,
(errcode(ERRCODE_DATA_CORRUPTED),
- errmsg("Unexpected response from the data nodes when combining, request type %d", combiner->request_type)));
+ errmsg("Unexpected response from the Datanodes when combining, request type %d", combiner->request_type)));
}
return processed;
@@ -2528,7 +2528,7 @@ ExecInitRemoteQuery(RemoteQuery *node, EState *estate, int eflags)
/*
* If there are parameters supplied, get them into a form to be sent to the
- * datanodes with bind message. We should not have had done this before.
+ * Datanodes with bind message. We should not have had done this before.
*/
if (estate->es_param_list_info)
{
@@ -2577,7 +2577,7 @@ copy_slot(RemoteQueryState *node, TupleTableSlot *src, TupleTableSlot *dst)
int i;
/*
- * Data node may be sending junk columns which are always at the end,
+ * Datanode may be sending junk columns which are always at the end,
* but it must not be shorter then result slot.
*/
Assert(dst->tts_tupleDescriptor->natts <= src->tts_tupleDescriptor->natts);
@@ -2623,7 +2623,7 @@ get_exec_connections(RemoteQueryState *planstate,
{
if (exec_nodes->en_expr)
{
- /* execution time determining of target data nodes */
+ /* execution time determining of target Datanodes */
bool isnull;
ExprState *estate = ExecInitExpr(exec_nodes->en_expr,
(PlanState *) planstate);
@@ -2706,7 +2706,7 @@ get_exec_connections(RemoteQueryState *planstate,
dn_conn_count = 0;
}
- /* Set Coordinator list and coordinator number */
+ /* Set Coordinator list and Coordinator number */
if ((list_length(nodelist) == 0 && exec_type == EXEC_ON_ALL_NODES) ||
(list_length(coordlist) == 0 && exec_type == EXEC_ON_COORDS))
{
@@ -2731,7 +2731,7 @@ get_exec_connections(RemoteQueryState *planstate,
/* Get connection for primary node, if used */
if (primarynode)
{
- /* Let's assume primary connection is always a datanode connection for the moment */
+ /* Let's assume primary connection is always a Datanode connection for the moment */
PGXCNodeAllHandles *pgxc_conn_res;
pgxc_conn_res = get_handles(primarynode, NULL, false);
@@ -2875,7 +2875,7 @@ do_query(RemoteQueryState *node)
* - there is only one writer node involved in the transaction (including
* the local node)
* - the statement being executed on the remote writer node is a single
- * step statement. IOW, coordinator must not send multiple queries to the
+ * step statement. IOW, Coordinator must not send multiple queries to the
* remote node.
*
* Once we have leak-proof mechanism to enforce these constraints, we
@@ -2911,7 +2911,7 @@ do_query(RemoteQueryState *node)
is_read_only, PGXC_NODE_DATANODE))
ereport(ERROR,
(errcode(ERRCODE_INTERNAL_ERROR),
- errmsg("Could not begin transaction on primary data node.")));
+ errmsg("Could not begin transaction on primary Datanode.")));
if (!pgxc_start_command_on_connection(primaryconnection, node, snapshot))
{
@@ -2919,7 +2919,7 @@ do_query(RemoteQueryState *node)
pfree(primaryconnection);
ereport(ERROR,
(errcode(ERRCODE_INTERNAL_ERROR),
- errmsg("Failed to send command to data nodes")));
+ errmsg("Failed to send command to Datanodes")));
}
Assert(node->combine_type == COMBINE_TYPE_SAME);
@@ -2938,7 +2938,7 @@ do_query(RemoteQueryState *node)
else
ereport(ERROR,
(errcode(ERRCODE_INTERNAL_ERROR),
- errmsg("Unexpected response from data node")));
+ errmsg("Unexpected response from Datanode")));
}
/* report error if any */
pgxc_node_report_error(node);
@@ -2950,7 +2950,7 @@ do_query(RemoteQueryState *node)
is_read_only, PGXC_NODE_DATANODE))
ereport(ERROR,
(errcode(ERRCODE_INTERNAL_ERROR),
- errmsg("Could not begin transaction on data nodes.")));
+ errmsg("Could not begin transaction on Datanodes.")));
if (!pgxc_start_command_on_connection(connections[i], node, snapshot))
{
@@ -2959,7 +2959,7 @@ do_query(RemoteQueryState *node)
pfree(primaryconnection);
ereport(ERROR,
(errcode(ERRCODE_INTERNAL_ERROR),
- errmsg("Failed to send command to data nodes")));
+ errmsg("Failed to send command to Datanodes")));
}
connections[i]->combiner = node;
}
@@ -2990,10 +2990,10 @@ do_query(RemoteQueryState *node)
ereport(ERROR,
(errcode(ERRCODE_INTERNAL_ERROR),
- errmsg("Failed to read response from data nodes")));
+ errmsg("Failed to read response from Datanodes")));
}
/*
- * Handle input from the data nodes.
+ * Handle input from the Datanodes.
* If we got a RESPONSE_DATAROW we can break handling to wrap
* it into a tuple and return. Handling will be continued upon
* subsequent invocations.
@@ -3067,7 +3067,7 @@ do_query(RemoteQueryState *node)
else
ereport(ERROR,
(errcode(ERRCODE_INTERNAL_ERROR),
- errmsg("Unexpected response from data node")));
+ errmsg("Unexpected response from Datanode")));
}
/* report error if any */
pgxc_node_report_error(node);
@@ -3294,7 +3294,7 @@ ExecRemoteQuery(RemoteQueryState *node)
/*
* Execute step of PGXC plan.
* The step specifies a command to be executed on specified nodes.
- * On first invocation connections to the data nodes are initialized and
+ * On first invocation connections to the Datanodes are initialized and
* command is executed. Further, as well as within subsequent invocations,
* responses are received until step is completed or there is a tuple to emit.
* If there is a tuple it is returned, otherwise returned NULL. The NULL result
@@ -3423,7 +3423,7 @@ ExecEndRemoteQuery(RemoteQueryState *node)
if (pgxc_node_receive(1, &conn, &timeout))
ereport(ERROR,
(errcode(ERRCODE_INTERNAL_ERROR),
- errmsg("Failed to read response from data nodes when ending query")));
+ errmsg("Failed to read response from Datanodes when ending query")));
}
}
@@ -3518,11 +3518,11 @@ close_node_cursors(PGXCNodeHandle **connections, int conn_count, char *cursor)
if (pgxc_node_send_close(connections[i], false, cursor) != 0)
ereport(WARNING,
(errcode(ERRCODE_INTERNAL_ERROR),
- errmsg("Failed to close data node cursor")));
+ errmsg("Failed to close Datanode cursor")));
if (pgxc_node_send_sync(connections[i]) != 0)
ereport(WARNING,
(errcode(ERRCODE_INTERNAL_ERROR),
- errmsg("Failed to close data node cursor")));
+ errmsg("Failed to close Datanode cursor")));
}
combiner = CreateResponseCombiner(conn_count, COMBINE_TYPE_NONE);
@@ -3532,7 +3532,7 @@ close_node_cursors(PGXCNodeHandle **connections, int conn_count, char *cursor)
if (pgxc_node_receive(conn_count, connections, NULL))
ereport(ERROR,
(errcode(ERRCODE_INTERNAL_ERROR),
- errmsg("Failed to close data node cursor")));
+ errmsg("Failed to close Datanode cursor")));
i = 0;
while (i < conn_count)
{
@@ -3559,7 +3559,7 @@ close_node_cursors(PGXCNodeHandle **connections, int conn_count, char *cursor)
/*
* Encode parameter values to format of DataRow message (the same format is
- * used in Bind) to prepare for sending down to data nodes.
+ * used in Bind) to prepare for sending down to Datanodes.
* The buffer to store encoded value is palloc'ed and returned as the result
* parameter. Function returns size of the result
*/
@@ -3685,7 +3685,7 @@ ExecRemoteQueryReScan(RemoteQueryState *node, ExprContext *exprCtxt)
/*
- * Execute utility statement on multiple data nodes
+ * Execute utility statement on multiple Datanodes
* It does approximately the same as
*
* RemoteQueryState *state = ExecInitRemoteQuery(plan, estate, flags);
@@ -3756,7 +3756,7 @@ ExecRemoteUtility(RemoteQuery *node)
gxid, need_tran_block, false, PGXC_NODE_DATANODE))
ereport(ERROR,
(errcode(ERRCODE_INTERNAL_ERROR),
- errmsg("Could not begin transaction on data nodes")));
+ errmsg("Could not begin transaction on Datanodes")));
for (i = 0; i < dn_conn_count; i++)
{
PGXCNodeHandle *conn = pgxc_connections->datanode_handles[i];
@@ -3767,13 +3767,13 @@ ExecRemoteUtility(RemoteQuery *node)
{
ereport(ERROR,
(errcode(ERRCODE_INTERNAL_ERROR),
- errmsg("Failed to send command to data nodes")));
+ errmsg("Failed to send command to Datanodes")));
}
if (pgxc_node_send_query(conn, node->sql_statement) != 0)
{
ereport(ERROR,
(errcode(ERRCODE_INTERNAL_ERROR),
- errmsg("Failed to send command to data nodes")));
+ errmsg("Failed to send command to Datanodes")));
}
}
}
@@ -3817,8 +3817,8 @@ ExecRemoteUtility(RemoteQuery *node)
if (pgxc_node_receive(dn_conn_count, pgxc_connections->datanode_handles, NULL))
break;
/*
- * Handle input from the data nodes.
- * We do not expect data nodes returning tuples when running utility
+ * Handle input from the Datanodes.
+ * We do not expect Datanodes returning tuples when running utility
* command.
* If we got EOF, move to the next connection, will receive more
* data on the next iteration.
@@ -3841,13 +3841,13 @@ ExecRemoteUtility(RemoteQuery *node)
{
ereport(ERROR,
(errcode(ERRCODE_INTERNAL_ERROR),
- errmsg("Unexpected response from data node")));
+ errmsg("Unexpected response from Datanode")));
}
else if (res == RESPONSE_DATAROW)
{
ereport(ERROR,
(errcode(ERRCODE_INTERNAL_ERROR),
- errmsg("Unexpected response from data node")));
+ errmsg("Unexpected response from Datanode")));
}
}
}
@@ -3910,7 +3910,7 @@ PGXCNodeCleanAndRelease(int code, Datum arg)
/* Clean up prepared transactions before releasing connections */
DropAllPreparedStatements();
- /* Release data node connections */
+ /* Release Datanode connections */
release_handles();
/* Disconnect from Pooler */
@@ -3939,7 +3939,7 @@ pgxc_get_connections(PGXCNodeHandle *connections[], int size, List *connlist)
}
/*
* Get all connections for which we have an open transaction,
- * for both data nodes and coordinators
+ * for both Datanodes and Coordinators
*/
static int
pgxc_get_transaction_nodes(PGXCNodeHandle *connections[], int size, bool write)
@@ -3960,7 +3960,7 @@ ExecCloseRemoteStatement(const char *stmt_name, List *nodelist)
if (list_length(nodelist) == 0)
return;
- /* get needed data node connections */
+ /* get needed Datanode connections */
all_handles = get_handles(nodelist, NIL, false);
conn_count = all_handles->dn_conn_count;
connections = all_handles->datanode_handles;
@@ -3973,20 +3973,20 @@ ExecCloseRemoteStatement(const char *stmt_name, List *nodelist)
{
/*
* statements are not affected by statement end, so consider
- * unclosed statement on the datanode as a fatal issue and
+ * unclosed statement on the Datanode as a fatal issue and
* force connection is discarded
*/
connections[i]->state = DN_CONNECTION_STATE_ERROR_FATAL;
ereport(WARNING,
(errcode(ERRCODE_INTERNAL_ERROR),
- errmsg("Failed to close data node statemrnt")));
+ errmsg("Failed to close Datanode statemrnt")));
}
if (pgxc_node_send_sync(connections[i]) != 0)
{
connections[i]->state = DN_CONNECTION_STATE_ERROR_FATAL;
ereport(WARNING,
(errcode(ERRCODE_INTERNAL_ERROR),
- errmsg("Failed to close data node statement")));
+ errmsg("Failed to close Datanode statement")));
}
}
@@ -4001,7 +4001,7 @@ ExecCloseRemoteStatement(const char *stmt_name, List *nodelist)
ereport(ERROR,
(errcode(ERRCODE_INTERNAL_ERROR),
- errmsg("Failed to close data node statement")));
+ errmsg("Failed to close Datanode statement")));
}
i = 0;
while (i < conn_count)
@@ -4030,7 +4030,7 @@ ExecCloseRemoteStatement(const char *stmt_name, List *nodelist)
/*
* DataNodeCopyInBinaryForAll
*
- * In a COPY TO, send to all datanodes PG_HEADER for a COPY TO in binary mode.
+ * In a COPY TO, send to all Datanodes PG_HEADER for a COPY TO in binary mode.
*/
int DataNodeCopyInBinaryForAll(char *msg_buf, int len, PGXCNodeHandle** copy_connections)
{
@@ -4072,7 +4072,7 @@ int DataNodeCopyInBinaryForAll(char *msg_buf, int len, PGXCNodeHandle** copy_con
}
else
{
- add_error_message(handle, "Invalid data node connection");
+ add_error_message(handle, "Invalid Datanode connection");
return EOF;
}
}
@@ -4196,8 +4196,8 @@ AtEOXact_Remote(void)
}
/*
- * Do pre-commit processing for remote nodes which includes data nodes and
- * coordinators. If more than one nodes are involved in the transaction write
+ * Do pre-commit processing for remote nodes which includes Datanodes and
+ * Coordinators. If more than one nodes are involved in the transaction write
* activity, then we must run 2PC. For 2PC, we do the following steps:
*
* 1. PREPARE the transaction locally if the local node is involved in the
@@ -4591,7 +4591,7 @@ FinishRemotePreparedTransaction(char *prepareGID, bool commit)
}
/*
- * Now get handles for all the involved data nodes and the coordinators
+ * Now get handles for all the involved Datanodes and the Coordinators
*/
pgxc_handles = get_handles(nodelist, coordlist, false);
@@ -4602,7 +4602,7 @@ FinishRemotePreparedTransaction(char *prepareGID, bool commit)
gxid, false, false))
ereport(ERROR,
(errcode(ERRCODE_INTERNAL_ERROR),
- errmsg("Could not begin transaction on data nodes")));
+ errmsg("Could not begin transaction on Datanodes")));
*/
RegisterTransactionNodes(pgxc_handles->dn_conn_count,
(void **) pgxc_handles->datanode_handles, true);
@@ -4659,7 +4659,7 @@ FinishRemotePreparedTransaction(char *prepareGID, bool commit)
/*
* pgxc_node_report_error
- * Throw error from datanode if any.
+ * Throw error from Datanode if any.
*/
static void
pgxc_node_report_error(RemoteQueryState *combiner)
diff --git a/src/backend/pgxc/pool/pgxcnode.c b/src/backend/pgxc/pool/pgxcnode.c
index 994733a087..cb314909e1 100644
--- a/src/backend/pgxc/pool/pgxcnode.c
+++ b/src/backend/pgxc/pool/pgxcnode.c
@@ -199,7 +199,7 @@ PGXCNodeConnStr(char *host, int port, char *dbname,
/*
* Build up connection string
- * remote type can be coordinator, datanode or application.
+ * remote type can be Coordinator, Datanode or application.
*/
num = snprintf(connstr, sizeof(connstr),
"host=%s port=%d dbname=%s user=%s application_name=pgxc options='-c remotetype=%s %s'",
@@ -1175,7 +1175,7 @@ pgxc_node_send_parse(PGXCNodeHandle * handle, const char* statement,
/*
* instead of parameter ids we should send parameter names (qualified by
* schema name if required). The OIDs of types can be different on
- * datanodes.
+ * Datanodes.
*/
for (cnt_params = 0; cnt_params < num_params; cnt_params++)
{
@@ -1820,7 +1820,7 @@ get_handles(List *datanodelist, List *coordlist, bool is_coord_only_query)
/*
* Get Handles for Coordinators
* If node list is empty execute request on current nodes
- * There are transactions where the coordinator list is NULL Ex:COPY
+ * There are transactions where the Coordinator list is NULL Ex:COPY
*/
if (coordlist)
diff --git a/src/backend/pgxc/pool/poolmgr.c b/src/backend/pgxc/pool/poolmgr.c
index 2d2348e6cc..ebb26fef00 100644
--- a/src/backend/pgxc/pool/poolmgr.c
+++ b/src/backend/pgxc/pool/poolmgr.c
@@ -2,12 +2,12 @@
*
* poolmgr.c
*
- * Connection pool manager handles connections to DataNodes
+ * Connection pool manager handles connections to Datanodes
*
* The pooler runs as a separate process and is forked off from a
- * coordinator postmaster. If the coordinator needs a connection from a
- * data node, it asks for one from the pooler, which maintains separate
- * pools for each data node. A group of connections can be requested in
+ * Coordinator postmaster. If the Coordinator needs a connection from a
+ * Datanode, it asks for one from the pooler, which maintains separate
+ * pools for each Datanode. A group of connections can be requested in
* a single request, and the pooler returns a list of file descriptors
* to use for the connections.
*
@@ -15,13 +15,13 @@
* as connections are idle. Also, it does not queue requests; if a
* connection is unavailable, it will simply fail. This should be implemented
* one day, although there is a chance for deadlocks. For now, limiting
- * connections should be done between the application and coordinator.
+ * connections should be done between the application and Coordinator.
* Still, this is useful to avoid having to re-establish connections to the
- * data nodes all the time for multiple coordinator backend sessions.
+ * Datanodes all the time for multiple Coordinator backend sessions.
*
* The term "agent" here refers to a session manager, one for each backend
- * coordinator connection to the pooler. It will contain a list of connections
- * allocated to a session, at most one per data node.
+ * Coordinator connection to the pooler. It will contain a list of connections
+ * allocated to a session, at most one per Datanode.
*
*
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
@@ -83,7 +83,7 @@ typedef struct
/* The root memory context */
static MemoryContext PoolerMemoryContext = NULL;
/*
- * Allocations of core objects: data node connections, upper level structures,
+ * Allocations of core objects: Datanode connections, upper level structures,
* connection strings, etc.
*/
static MemoryContext PoolerCoreContext = NULL;
@@ -458,16 +458,16 @@ agent_create(void)
/*
* session_options
* Returns the pgoptions string generated using a particular
- * list of parameters that are required to be propagated to datanodes.
+ * list of parameters that are required to be propagated to Datanodes.
* These parameters then become default values for the pooler sessions.
* For e.g., a psql user sets PGDATESTYLE. This value should be set
* as the default connection parameter in the pooler session that is
- * connected to the datanodes. There are various parameters which need to
+ * connected to the Datanodes. There are various parameters which need to
* be analysed individually to determine whether these should be set on
- * datanodes.
+ * Datanodes.
*
* Note: These parameters values are the default values of the particular
- * coordinator backend session, and not the new values set by SET command.
+ * Coordinator backend session, and not the new values set by SET command.
*
*/
@@ -1442,8 +1442,8 @@ agent_acquire_connections(PoolAgent *agent, List *datanodelist, List *coordlist)
* Allocate memory
* File descriptors of Datanodes and Coordinators are saved in the same array,
* This array will be sent back to the postmaster.
- * It has a length equal to the length of the datanode list
- * plus the length of the coordinator list.
+ * It has a length equal to the length of the Datanode list
+ * plus the length of the Coordinator list.
* Datanode fds are saved first, then Coordinator fds are saved.
*/
result = (int *) palloc((list_length(datanodelist) + list_length(coordlist)) * sizeof(int));
@@ -1622,7 +1622,7 @@ cancel_query_on_connections(PoolAgent *agent, List *datanodelist, List *coordlis
if (agent == NULL)
return nCount;
- /* Send cancel on Data nodes first */
+ /* Send cancel on Datanodes first */
foreach(nodelist_item, datanodelist)
{
int node = lfirst_int(nodelist_item);
@@ -2256,7 +2256,7 @@ grow_pool(DatabasePool *dbPool, Oid node)
destroy_slot(slot);
ereport(LOG,
(errcode(ERRCODE_CONNECTION_FAILURE),
- errmsg("failed to connect to data node")));
+ errmsg("failed to connect to Datanode")));
break;
}
@@ -2303,10 +2303,8 @@ destroy_node_pool(PGXCNodePool *node_pool)
/*
* At this point all agents using connections from this pool should be already closed
- * If this not the connections to the data nodes assigned to them remain open, this will
- * consume data node resources.
- * I believe this is not the case because pool is only destroyed on coordinator shutdown.
- * However we should be careful when changing things
+ * If this not the connections to the Datanodes assigned to them remain open, this will
+ * consume Datanode resources.
*/
elog(DEBUG1, "About to destroy node pool %s, current size is %d, %d connections are in use",
node_pool->connstr, node_pool->freeSize, node_pool->size - node_pool->freeSize);
diff --git a/src/backend/pgxc/pool/poolutils.c b/src/backend/pgxc/pool/poolutils.c
index 9f434a899b..e7a7ba3a5c 100644
--- a/src/backend/pgxc/pool/poolutils.c
+++ b/src/backend/pgxc/pool/poolutils.c
@@ -49,7 +49,7 @@ pgxc_pool_check(PG_FUNCTION_ARGS)
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
(errmsg("must be superuser to manage pooler"))));
- /* A datanode has no pooler active, so do not bother about that */
+ /* A Datanode has no pooler active, so do not bother about that */
if (IS_PGXC_DATANODE)
PG_RETURN_BOOL(true);
@@ -100,7 +100,7 @@ pgxc_pool_reload(PG_FUNCTION_ARGS)
(errcode(ERRCODE_ACTIVE_SQL_TRANSACTION),
errmsg("pgxc_pool_reload cannot run inside a transaction block")));
- /* A datanode has no pooler active, so do not bother about that */
+ /* A Datanode has no pooler active, so do not bother about that */
if (IS_PGXC_DATANODE)
PG_RETURN_BOOL(true);
diff --git a/src/backend/pgxc/pool/postgresql_fdw.c b/src/backend/pgxc/pool/postgresql_fdw.c
index 2aef35632b..834313995b 100644
--- a/src/backend/pgxc/pool/postgresql_fdw.c
+++ b/src/backend/pgxc/pool/postgresql_fdw.c
@@ -166,12 +166,12 @@ foreign_qual_walker(Node *node, foreign_qual_context *context)
Aggref *aggref = (Aggref *)node;
/*
* An aggregate with ORDER BY, DISTINCT directives need to be
- * computed at coordinator using all the rows. An aggregate
+ * computed at Coordinator using all the rows. An aggregate
* without collection function needs to be computed at
- * coordinator.
+ * Coordinator.
* PGXCTODO: polymorphic transition types need to be resolved to
- * correctly interpret the transition results from data nodes.
- * For now compute such aggregates at coordinator.
+ * correctly interpret the transition results from Datanodes.
+ * For now compute such aggregates at Coordinator.
*/
if (aggref->aggorder ||
aggref->aggdistinct ||
@@ -180,7 +180,7 @@ foreign_qual_walker(Node *node, foreign_qual_context *context)
IsPolymorphicType(aggref->aggtrantype))
return true;
/*
- * data node can compute transition results, so, add the
+ * Datanode can compute transition results, so, add the
* aggregate to the context if context is present
*/
if (context)
diff --git a/src/backend/rewrite/rewriteHandler.c b/src/backend/rewrite/rewriteHandler.c
index 758e6205b4..ad226ae180 100644
--- a/src/backend/rewrite/rewriteHandler.c
+++ b/src/backend/rewrite/rewriteHandler.c
@@ -2564,7 +2564,7 @@ QueryRewrite(Query *parsetree)
* Rewrite the CREATE TABLE AS and SELECT INTO queries as a
* INSERT INTO .. SELECT query. The target table must be created first using
* utility command processing. This takes care of creating the target table on
- * all the coordinators and the data nodes.
+ * all the Coordinators and the Datanodes.
*/
List *
QueryRewriteCTAS(Query *parsetree)
diff --git a/src/backend/storage/ipc/procarray.c b/src/backend/storage/ipc/procarray.c
index 8b9b46aed6..671b2c4398 100644
--- a/src/backend/storage/ipc/procarray.c
+++ b/src/backend/storage/ipc/procarray.c
@@ -166,9 +166,9 @@ static void DisplayXidCache(void);
typedef enum
{
SNAPSHOT_UNDEFINED, /* Coordinator has not sent snapshot or not yet connected */
- SNAPSHOT_LOCAL, /* Coordinator has instructed data node to build up snapshot from the local procarray */
+ SNAPSHOT_LOCAL, /* Coordinator has instructed Datanode to build up snapshot from the local procarray */
SNAPSHOT_COORDINATOR, /* Coordinator has sent snapshot data */
- SNAPSHOT_DIRECT /* Data Node obtained directly from GTM */
+ SNAPSHOT_DIRECT /* Datanode obtained directly from GTM */
} SnapshotSource;
void SetGlobalSnapshotData(int xmin, int xmax, int xcnt, int *xip);
@@ -432,7 +432,7 @@ ProcArrayEndTransaction(PGPROC *proc, TransactionId latestXid)
#ifdef PGXC
/*
* Remove this assertion. We have seen this failing because a ROLLBACK
- * statement may get canceled by a coordinator, leading to recursive
+ * statement may get canceled by a Coordinator, leading to recursive
* abort of a transaction. This must be a PostgreSQL issue, highlighted
* by XC. See thread on hackers with subject "Canceling ROLLBACK
* statement"
@@ -2450,7 +2450,7 @@ DisplayXidCache(void)
#ifdef PGXC
/*
- * Store snapshot data received from the coordinator
+ * Store snapshot data received from the Coordinator
*/
void
SetGlobalSnapshotData(int xmin, int xmax, int xcnt, int *xip)
@@ -2466,7 +2466,7 @@ SetGlobalSnapshotData(int xmin, int xmax, int xcnt, int *xip)
}
/*
- * Force datanode to use local snapshot data
+ * Force Datanode to use local snapshot data
*/
void
UnsetGlobalSnapshotData(void)
@@ -2482,8 +2482,8 @@ UnsetGlobalSnapshotData(void)
}
/*
- * Get snapshot data for data node
- * This is usually passed down from the coordinator
+ * Get snapshot data for Datanode
+ * This is usually passed down from the Coordinator
*
* returns whether or not to return immediately with snapshot
*/
@@ -2677,8 +2677,8 @@ GetSnapshotDataDataNode(Snapshot snapshot)
}
/*
- * Get snapshot data for coordinator
- * It will later be passed down to data nodes
+ * Get snapshot data for Coordinator
+ * It will later be passed down to Datanodes
*
* returns whether or not to return immediately with snapshot
*/
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c
index bec0e4a894..4cefa100fd 100644
--- a/src/backend/tcop/postgres.c
+++ b/src/backend/tcop/postgres.c
@@ -1276,7 +1276,7 @@ exec_parse_message(const char *query_string, /* string to execute */
#ifdef PGXC
/*
* if we have the parameter types passed, which happens only in case of
- * connection from coordinators, fill paramTypes with their OIDs for
+ * connection from Coordinators, fill paramTypes with their OIDs for
* subsequent use. We have to do name to OID conversion, in a transaction
* context.
*/
@@ -3543,18 +3543,18 @@ process_postgres_switches(int argc, char *argv[], GucContext ctx)
#ifdef PGXC
/*
- * Make sure we specified the mode if Coordinator or Data Node.
+ * Make sure we specified the mode if Coordinator or Datanode.
* Allow for the exception of initdb by checking config option
*/
if (!IS_PGXC_COORDINATOR && !IS_PGXC_DATANODE && IsUnderPostmaster)
{
ereport(FATAL,
(errcode(ERRCODE_SYNTAX_ERROR),
- errmsg("PG-XC: must start as either a Coordinator (-C) or Data Node (-X)\n")));
+ errmsg("PG-XC: must start as either a Coordinator (-C) or Datanode (-X)\n")));
}
if (!IsPostmasterEnvironment)
{
- /* Treat it as a data node for initdb to work properly */
+ /* Treat it as a Datanode for initdb to work properly */
isPGXCDataNode = true;
}
#endif
diff --git a/src/backend/tcop/utility.c b/src/backend/tcop/utility.c
index 333efcaab8..581651d1e6 100644
--- a/src/backend/tcop/utility.c
+++ b/src/backend/tcop/utility.c
@@ -1674,7 +1674,7 @@ standard_ProcessUtility(Node *parsetree,
PreventCommandDuringRecovery("VACUUM");
#ifdef PGXC
/*
- * We have to run the command on nodes before coordinator because
+ * We have to run the command on nodes before Coordinator because
* vacuum() pops active snapshot and we can not send it to nodes
*/
if (IS_PGXC_COORDINATOR)
@@ -2084,7 +2084,7 @@ standard_ProcessUtility(Node *parsetree,
case T_RemoteQuery:
Assert(IS_PGXC_COORDINATOR);
/*
- * Do not launch query on Other Datanodes if remote connection is a coordinator one
+ * Do not launch query on Other Datanodes if remote connection is a Coordinator one
* it will cause a deadlock in the cluster at Datanode levels.
*/
if (!IsConnFromCoord())
@@ -3787,8 +3787,8 @@ GetNodesForCommentUtility(CommentStmt *stmt, bool *is_temp)
/*
* GetNodesForRulesUtility
* Get the nodes to execute this RULE related utility statement.
- * A rule is expanded on coordinator itself, and does not need any
- * existence on datanode. In fact, if it were to exist on datanode,
+ * A rule is expanded on Coordinator itself, and does not need any
+ * existence on Datanode. In fact, if it were to exist on Datanode,
* there is a possibility that it would expand again
*/
static RemoteQueryExecType
diff --git a/src/backend/utils/adt/dbsize.c b/src/backend/utils/adt/dbsize.c
index 7a7d6e4c32..df05e53731 100644
--- a/src/backend/utils/adt/dbsize.c
+++ b/src/backend/utils/adt/dbsize.c
@@ -43,9 +43,9 @@ static int64 pgxc_exec_sizefunc(Oid relOid, char *funcname, char *extra_arg);
/*
* Below macro is important when the object size functions are called
- * for system catalog tables. For pg_catalog tables and other coordinator-only
- * tables, we should return the data from coordinator. If we don't find
- * locator info, that means it is a coordinator-only table.
+ * for system catalog tables. For pg_catalog tables and other Coordinator-only
+ * tables, we should return the data from Coordinator. If we don't find
+ * locator info, that means it is a Coordinator-only table.
*/
#define COLLECT_FROM_DATANODES(relid) \
(IS_PGXC_COORDINATOR && !IsConnFromCoord() && \
@@ -728,7 +728,7 @@ pg_relation_filepath(PG_FUNCTION_ARGS)
/*
* pgxc_tablespace_size
- * Given a tablespace oid, return sum of pg_tablespace_size() executed on all the datanodes
+ * Given a tablespace oid, return sum of pg_tablespace_size() executed on all the Datanodes
*/
static Datum
pgxc_tablespace_size(Oid tsOid)
@@ -753,7 +753,7 @@ pgxc_tablespace_size(Oid tsOid)
/*
* pgxc_database_size
- * Given a dboid, return sum of pg_database_size() executed on all the datanodes
+ * Given a dboid, return sum of pg_database_size() executed on all the Datanodes
*/
static Datum
pgxc_database_size(Oid dbOid)
@@ -807,7 +807,7 @@ pgxc_execute_on_nodes(int numnodes, Oid *nodelist, char *query)
initStringInfo(&buf);
- /* Get pg_***_size function results from all data nodes */
+ /* Get pg_***_size function results from all Datanodes */
for (i = 0; i < numnodes; i++)
{
nodename = get_pgxc_nodename(nodelist[i]);
@@ -849,7 +849,7 @@ pgxc_execute_on_nodes(int numnodes, Oid *nodelist, char *query)
/*
* pgxc_exec_sizefunc
- * Execute the given object size system function on all the datanodes associated
+ * Execute the given object size system function on all the Datanodes associated
* with relOid, and return the sum of all.
*
* Args:
diff --git a/src/backend/utils/adt/lockfuncs.c b/src/backend/utils/adt/lockfuncs.c
index e437103ce0..3a9e5dec5e 100644
--- a/src/backend/utils/adt/lockfuncs.c
+++ b/src/backend/utils/adt/lockfuncs.c
@@ -439,9 +439,9 @@ pg_lock_status(PG_FUNCTION_ARGS)
/*
* pgxc_advisory_lock - Core function that implements the algorithm needed to
- * propogate the advisory lock function calls to all coordinators.
+ * propogate the advisory lock function calls to all Coordinators.
* The idea is to make the advisory locks cluster-aware, so that a user having
- * a lock from coordinator 1 will make the user from coordinator 2 to wait for
+ * a lock from Coordinator 1 will make the user from Coordinator 2 to wait for
* the same lock.
*
* Return true if all locks are returned successfully. False otherwise.
@@ -476,7 +476,7 @@ pgxc_advisory_lock(int64 key64, int32 key1, int32 key2, bool iskeybig,
PgxcNodeGetOids(&coOids, &dnOids, &numcoords, &numdnodes, false);
- /* Skip everything XC specific if there's only one coordinator running */
+ /* Skip everything XC specific if there's only one Coordinator running */
if (numcoords <= 1)
{
(void) LockAcquire(&locktag, lockmode, sessionLock, dontWait);
@@ -521,22 +521,22 @@ pgxc_advisory_lock(int64 key64, int32 key1, int32 key2, bool iskeybig,
appendStringInfo(&unlock_cmd, "SELECT pg_catalog.%s(%s)", unlock_funcname.data, args.data);
/*
- * Go on locking on each coordinator. Keep on unlocking the previous one
- * after a lock is held on next coordinator. Don't unlock the local
- * coordinator. After finishing all coordinators, ultimately only the local
- * coordinator would be locked, but still we will have scanned all
- * coordinators to make sure no one else has already grabbed the lock. The
+ * Go on locking on each Coordinator. Keep on unlocking the previous one
+ * after a lock is held on next Coordinator. Don't unlock the local
+ * Coordinator. After finishing all Coordinators, ultimately only the local
+ * Coordinator would be locked, but still we will have scanned all
+ * Coordinators to make sure no one else has already grabbed the lock. The
* reason for unlocking all remote locks is because the session level locks
* don't get unlocked until explicitly unlocked or the session quits. After
* the user session quits without explicitly unlocking, the coord-to-coord
- * pooler connection stays and so does the remote coordinator lock.
+ * pooler connection stays and so does the remote Coordinator lock.
*/
prev = -1;
for (i = 0; i <= numcoords && !abort_locking; i++, prev++)
{
if (i < numcoords)
{
- /* If this coordinator is myself, execute native lock calls */
+ /* If this Coordinator is myself, execute native lock calls */
if (i == PGXCNodeId - 1)
lock_status = LockAcquire(&locktag, lockmode, sessionLock, dontWait);
else
@@ -546,7 +546,7 @@ pgxc_advisory_lock(int64 key64, int32 key1, int32 key2, bool iskeybig,
{
abort_locking = true;
/*
- * If we have gone past the local coordinator node, it implies
+ * If we have gone past the local Coordinator node, it implies
* that we have obtained a local lock. But now that we are
* aborting, we need to release the local lock first.
*/
@@ -557,7 +557,7 @@ pgxc_advisory_lock(int64 key64, int32 key1, int32 key2, bool iskeybig,
/*
* If we are dealing with session locks, unlock the previous lock, but
- * only if it is a remote coordinator. If it is a local one, we want to
+ * only if it is a remote Coordinator. If it is a local one, we want to
* keep that lock. Remember, the final status should be that there is
* only *one* lock held, and that is the local lock.
*/
diff --git a/src/backend/utils/adt/ruleutils.c b/src/backend/utils/adt/ruleutils.c
index 3c781bb019..8864052996 100644
--- a/src/backend/utils/adt/ruleutils.c
+++ b/src/backend/utils/adt/ruleutils.c
@@ -106,7 +106,7 @@ typedef struct
int indentLevel; /* current indent level for prettyprint */
bool varprefix; /* TRUE to print prefixes on Vars */
#ifdef PGXC
- bool finalise_aggs; /* should datanode finalise the aggregates? */
+ bool finalise_aggs; /* should Datanode finalise the aggregates? */
#endif /* PGXC */
} deparse_context;
@@ -3404,7 +3404,7 @@ get_target_list(List *targetList, deparse_context *context,
/*
* Because the empty target list can generate invalid SQL
* clause. Here, just fill a '*' to process a table without
- * any columns, this statement will be sent to data nodes
+ * any columns, this statement will be sent to Datanodes
* and treated correctly on remote nodes.
*/
if (no_targetlist)
@@ -6441,7 +6441,7 @@ get_agg_expr(Aggref *aggref, deparse_context *context)
* Datanode should send finalised aggregate results. Datanodes evaluate only
* transition results. In order to get the finalised aggregate, we enclose
* the aggregate call inside final function call, so as to get finalised
- * results at the coordinator
+ * results at the Coordinator
*/
if (context->finalise_aggs)
{
diff --git a/src/backend/utils/cache/lsyscache.c b/src/backend/utils/cache/lsyscache.c
index 589c9ffe1d..ef79d5b5d6 100644
--- a/src/backend/utils/cache/lsyscache.c
+++ b/src/backend/utils/cache/lsyscache.c
@@ -2375,8 +2375,8 @@ get_pgxc_groupmembers(Oid groupid, Oid **members)
/*
* get_pgxc_classnodes
- * Obtain PGXC class datanode list for given relation Oid
- * Return number of datanodes and their list
+ * Obtain PGXC class Datanode list for given relation Oid
+ * Return number of Datanodes and their list
*
* Node list is returned as a palloc'd array
*/
diff --git a/src/backend/utils/cache/plancache.c b/src/backend/utils/cache/plancache.c
index aaa2151d44..42ab88527b 100644
--- a/src/backend/utils/cache/plancache.c
+++ b/src/backend/utils/cache/plancache.c
@@ -357,7 +357,7 @@ StoreCachedPlan(CachedPlanSource *plansource,
#ifdef PGXC
/*
* If this plansource belongs to a named prepared statement, store the stmt
- * name for the datanode queries.
+ * name for the Datanode queries.
*/
if (IS_PGXC_COORDINATOR && !IsConnFromCoord()
&& plansource->stmt_name)
@@ -367,7 +367,7 @@ StoreCachedPlan(CachedPlanSource *plansource,
/*
* Scan the plans and set the statement field for all found RemoteQuery
- * nodes so they use data node statements
+ * nodes so they use Datanode statements
*/
n = 0;
foreach(lc, stmt_list)
@@ -467,7 +467,7 @@ DropCachedPlan(CachedPlanSource *plansource)
{
ListCell *lc;
- /* Close any active planned datanode statements */
+ /* Close any active planned Datanode statements */
foreach (lc, plan->stmt_list)
{
Node *node = lfirst(lc);
@@ -697,7 +697,7 @@ RevalidateCachedPlan(CachedPlanSource *plansource, bool useResOwner)
}
/*
- * Find and release all datanode statements referenced by the plan node and subnodes
+ * Find and release all Datanode statements referenced by the plan node and subnodes
*/
#ifdef PGXC
static void
diff --git a/src/bin/pg_ctl/pg_ctl.c b/src/bin/pg_ctl/pg_ctl.c
index 381c33d8dd..02c84ddcc2 100644
--- a/src/bin/pg_ctl/pg_ctl.c
+++ b/src/bin/pg_ctl/pg_ctl.c
@@ -2155,11 +2155,11 @@ main(int argc, char **argv)
}
#ifdef PGXC
- /* stop command does not need to have coordinator or datanode options */
+ /* stop command does not need to have Coordinator or Datanode options */
if ((ctl_command == START_COMMAND || ctl_command == RESTART_COMMAND)
&& !pgxcCommand)
{
- write_stderr(_("%s: coordinator or datanode option not specified (-Z)\n"),
+ write_stderr(_("%s: Coordinator or Datanode option not specified (-Z)\n"),
progname);
do_advice();
exit(1);
diff --git a/src/gtm/common/elog.c b/src/gtm/common/elog.c
index af0d1e9216..70e0c95a9b 100644
--- a/src/gtm/common/elog.c
+++ b/src/gtm/common/elog.c
@@ -857,7 +857,7 @@ send_message_to_server_log(ErrorData *edata)
* At present, this function is not used within GTM. Because this flushes
* message back to the client, GTM should consider to flush backup to the
* standby. However, we cannot simply refer to isGTM because this module
- * can be included in coordinator backends. If this can really be called
+ * can be included in Coordinator backends. If this can really be called
* from any GTM module, we need a solution to determine that the Port is
* in GTM or not, without direct reference to isGTM.
*
diff --git a/src/gtm/main/gtm_txn.c b/src/gtm/main/gtm_txn.c
index a8f13bbb7d..44148e06a4 100644
--- a/src/gtm/main/gtm_txn.c
+++ b/src/gtm/main/gtm_txn.c
@@ -958,7 +958,7 @@ GTM_StartPreparedTransaction(GTM_TransactionHandle txn,
GTM_MAX_NODESTRING_LEN);
memcpy(gtm_txninfo->nodestring, nodestring, strlen(nodestring) + 1);
- /* It is possible that no datanode is involved in a transaction (Sequence DDL) */
+ /* It is possible that no Datanode is involved in a transaction */
if (gtm_txninfo->gti_gid == NULL)
gtm_txninfo->gti_gid = (char *)MemoryContextAlloc(TopMostMemoryContext, GTM_MAX_GID_LEN);
memcpy(gtm_txninfo->gti_gid, gid, strlen(gid) + 1);
@@ -1755,7 +1755,7 @@ ProcessCommitPreparedTransactionCommand(Port *myport, StringInfo message, bool i
* For a given GID the following info is returned:
* - a fresh GXID,
* - GXID of the transaction that made the prepare
- * - datanode and coordinator node list involved in the prepare
+ * - Datanode and Coordinator node list involved in the prepare
*/
void
ProcessGetGIDDataTransactionCommand(Port *myport, StringInfo message)
diff --git a/src/gtm/main/main.c b/src/gtm/main/main.c
index 769e5aef30..f24a8b77df 100644
--- a/src/gtm/main/main.c
+++ b/src/gtm/main/main.c
@@ -957,7 +957,7 @@ GTM_ThreadMain(void *argp)
{
/*
* We expect a startup message at the very start. The message type is
- * REGISTER_COORD, followed by the 4 byte coordinator ID
+ * REGISTER_COORD, followed by the 4 byte Coordinator ID
*/
char startup_type;
GTM_StartupPacket sp;
diff --git a/src/include/executor/tuptable.h b/src/include/executor/tuptable.h
index 3f5da71a48..96823eddf3 100644
--- a/src/include/executor/tuptable.h
+++ b/src/include/executor/tuptable.h
@@ -120,7 +120,7 @@ typedef struct TupleTableSlot
HeapTuple tts_tuple; /* physical tuple, or NULL if virtual */
#ifdef PGXC
/*
- * PGXC extension to support tuples sent from remote data node.
+ * PGXC extension to support tuples sent from remote Datanode.
*/
char *tts_dataRow; /* Tuple data in DataRow format */
int tts_dataLen; /* Actual length of the data row */
diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h
index a3827cc435..f94557de5f 100644
--- a/src/include/nodes/parsenodes.h
+++ b/src/include/nodes/parsenodes.h
@@ -158,8 +158,8 @@ typedef struct Query
#ifdef PGXC
/* need this info for PGXC Planner, may be temporary */
char *sql_statement; /* original query */
- bool qry_finalise_aggs; /* used for queries intended for datanodes,
- * should datanode finalise the aggregates? */
+ bool qry_finalise_aggs; /* used for queries intended for Datanodes,
+ * should Datanode finalise the aggregates? */
bool is_local; /* enforce query execution on local node
* this is used by EXECUTE DIRECT especially. */
#endif
diff --git a/src/include/nodes/plannodes.h b/src/include/nodes/plannodes.h
index 2c490680a1..e849fc34c0 100644
--- a/src/include/nodes/plannodes.h
+++ b/src/include/nodes/plannodes.h
@@ -607,7 +607,7 @@ typedef struct Agg
long numGroups; /* estimated number of groups in input */
#ifdef PGXC
bool skip_trans; /* apply collection directly on the data received
- * from remote data nodes
+ * from remote Datanodes
*/
#endif /* PGXC */
} Agg;
diff --git a/src/include/nodes/relation.h b/src/include/nodes/relation.h
index 2032482691..73b3c18a47 100644
--- a/src/include/nodes/relation.h
+++ b/src/include/nodes/relation.h
@@ -229,7 +229,7 @@ typedef struct PlannerInfo
int rs_alias_index; /* used to build the alias reference */
/*
- * In XC coordinators are supposed to skip the handling of
+ * In Postgres-XC Coordinators are supposed to skip the handling of
* row marks of type ROW_MARK_EXCLUSIVE & ROW_MARK_SHARE.
* In order to do that we simply remove such type
* of row marks from the list rowMarks. Instead they are saved
diff --git a/src/include/pgxc/execRemote.h b/src/include/pgxc/execRemote.h
index c27e755a8d..2241a50e8f 100644
--- a/src/include/pgxc/execRemote.h
+++ b/src/include/pgxc/execRemote.h
@@ -2,7 +2,7 @@
*
* execRemote.h
*
- * Functions to execute commands on multiple Data Nodes
+ * Functions to execute commands on multiple Datanodes
*
*
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group ?
@@ -75,7 +75,7 @@ typedef struct RemoteQueryState
{
ScanState ss; /* its first field is NodeTag */
int node_count; /* total count of participating nodes */
- PGXCNodeHandle **connections; /* data node connections being combined */
+ PGXCNodeHandle **connections; /* Datanode connections being combined */
int conn_count; /* count of active connections */
int current_conn; /* used to balance load when reading from connections */
CombineType combine_type; /* see CombineType enum */
@@ -88,7 +88,7 @@ typedef struct RemoteQueryState
char errorCode[5]; /* error code to send back to client */
char *errorMessage; /* error message to send back to client */
char *errorDetail; /* error detail to send back to client */
- bool query_Done; /* query has been sent down to data nodes */
+ bool query_Done; /* query has been sent down to Datanodes */
RemoteDataRowData currentRow; /* next data ro to be wrapped into a tuple */
/* TODO use a tuplestore as a rowbuffer */
List *rowBuffer; /* buffer where rows are stored when connection
@@ -116,7 +116,7 @@ typedef struct RemoteQueryState
char *cursor; /* cursor name */
char *update_cursor; /* throw this cursor current tuple can be updated */
int cursor_count; /* total count of participating nodes */
- PGXCNodeHandle **cursor_connections;/* data node connections being combined */
+ PGXCNodeHandle **cursor_connections;/* Datanode connections being combined */
/* Support for parameters */
char *paramval_data; /* parameter data, format is like in BIND */
int paramval_len; /* length of parameter values data */
diff --git a/src/include/pgxc/locator.h b/src/include/pgxc/locator.h
index 49b09ecd07..021e30f9cf 100644
--- a/src/include/pgxc/locator.h
+++ b/src/include/pgxc/locator.h
@@ -27,7 +27,7 @@
* scheme, e.g. result of JOIN of
* replicated and distributed table */
-/* Maximum number of preferred datanodes that can be defined in cluster */
+/* Maximum number of preferred Datanodes that can be defined in cluster */
#define MAX_PREFERRED_NODES 64
#define HASH_SIZE 4096
diff --git a/src/include/pgxc/pgxcnode.h b/src/include/pgxc/pgxcnode.h
index 770b9c3a36..c1047d12f9 100644
--- a/src/include/pgxc/pgxcnode.h
+++ b/src/include/pgxc/pgxcnode.h
@@ -26,11 +26,11 @@
#define NO_SOCKET -1
-/* Connection to data node maintained by Pool Manager */
+/* Connection to Datanode maintained by Pool Manager */
typedef struct PGconn NODE_CONNECTION;
typedef struct PGcancel NODE_CANCEL;
-/* Helper structure to access data node from Session */
+/* Helper structure to access Datanode from Session */
typedef enum
{
DN_CONNECTION_STATE_IDLE, /* idle, ready for query */
@@ -54,7 +54,7 @@ typedef enum
* Response checking is required in case of PREPARE TRANSACTION and should not be done for the rest
* of the cases for performance reasons, hence we have an option to ignore response checking.
* The problem with PREPARE TRANSACTION is that it can result in a ROLLBACK response
- * yet coordinator would think it got done on all nodes.
+ * yet Coordinator would think it got done on all nodes.
* If we ignore ROLLBACK response then we would try to COMMIT a transaction that
* never got prepared, which in an incorrect behavior.
*/
diff --git a/src/include/pgxc/planner.h b/src/include/pgxc/planner.h
index caf8f8c916..e32f033682 100644
--- a/src/include/pgxc/planner.h
+++ b/src/include/pgxc/planner.h
@@ -88,8 +88,8 @@ typedef struct
SimpleSort *sort;
bool read_only; /* do not use 2PC when committing read only steps */
bool force_autocommit; /* some commands like VACUUM require autocommit mode */
- char *statement; /* if specified use it as a PreparedStatement name on data nodes */
- char *cursor; /* if specified use it as a Portal name on data nodes */
+ char *statement; /* if specified use it as a PreparedStatement name on Datanodes */
+ char *cursor; /* if specified use it as a Portal name on Datanodes */
int num_params; /* number of parameters specified for Prepared statement */
Oid *param_types; /* parameter types, this pointer is shared
* across all the RemoteQuery nodes in the
@@ -143,7 +143,7 @@ typedef enum
FQS_UNSHIPPABLE_EXPR = 0, /* it has unshippable expression */
FQS_SINGLENODE_EXPR, /* it has single node expression, like
* aggregates, ORDER BY etc. */
- FQS_NEEDS_COORD, /* the query needs coordinator */
+ FQS_NEEDS_COORD, /* the query needs Coordinator */
FQS_VARLEVEL, /* one of its subqueries has a VAR
* referencing an upper level query
* relation */
diff --git a/src/include/pgxc/poolmgr.h b/src/include/pgxc/poolmgr.h
index 3845b8eab2..a43946aeb5 100644
--- a/src/include/pgxc/poolmgr.h
+++ b/src/include/pgxc/poolmgr.h
@@ -2,7 +2,7 @@
*
* poolmgr.h
*
- * Definitions for the data nodes connection pool.
+ * Definitions for the Datanode connection pool.
*
*
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
@@ -200,7 +200,7 @@ extern int PoolManagerAbortTransactions(char *dbname, char *username, int **proc
/* Return connections back to the pool, for both Coordinator and Datanode connections */
extern void PoolManagerReleaseConnections(void);
-/* Cancel a running query on data nodes as well as on other coordinators */
+/* Cancel a running query on Datanodes as well as on other Coordinators */
extern void PoolManagerCancelQuery(int dn_count, int* dn_list, int co_count, int* co_list);
/* Lock/unlock pool manager */
diff --git a/src/pgxc/bin/pgxc_clean/pgxc_clean.c b/src/pgxc/bin/pgxc_clean/pgxc_clean.c
index b2d862ed4c..c72600d1c5 100644
--- a/src/pgxc/bin/pgxc_clean/pgxc_clean.c
+++ b/src/pgxc/bin/pgxc_clean/pgxc_clean.c
@@ -23,10 +23,10 @@
* -a, --all cleanup all the database avilable
* -d, --dbname=DBNAME database name to clean up. Multiple -d option
* can be specified.
- * -h, --host=HOSTNAME coordinator hostname to connect to.
+ * -h, --host=HOSTNAME Coordinator hostname to connect to.
* -N, --no-clean only test. no cleanup actually.
* -o, --output=FILENAME output file name.
- * -p, --port=PORT coordinator port number.
+ * -p, --port=PORT Coordinator port number.
* -q, --quiet do not print messages except for error, default.
* -s, --status prints out 2PC status.
* -U, --username=USERNAME database user name
@@ -119,7 +119,7 @@ static void do_commit_abort(PGconn *conn, txn_info *txn, bool is_commit);
static bool setMaintenanceMode(PGconn *conn);
/*
- * Connection to the coordinator
+ * Connection to the Coordinator
*/
PGconn *coord_conn;
@@ -178,13 +178,13 @@ int main(int argc, char *argv[])
}
if (coordinator_host == NULL)
{
- /* Default coordinator host */
+ /* Default Coordinator host */
if ((coordinator_host = getenv("PGHOST")) == NULL)
coordinator_host = "localhost";
}
if (coordinator_port == -1)
{
- /* Default coordinator port */
+ /* Default Coordinator port */
char *pgport;
if ((pgport = getenv("PGPORT")) == NULL)
@@ -240,7 +240,7 @@ int main(int argc, char *argv[])
}
/*
- * Get my nodename (connected coordinator)
+ * Get my nodename (connected Coordinator)
*/
getMyNodename(coord_conn);
if (verbose_opt)
@@ -249,12 +249,12 @@ int main(int argc, char *argv[])
}
/*
- * Get availabel databases
+ * Get available databases
*
- * pgxc_clean assumes that all the database are avilable from the connecting coordinator.
+ * pgxc_clean assumes that all the database are available from the connecting Coordinator.
* Some (expert) DBA can create a database local to subset of the node by EXECUTE DIRECT.
* In this case, DBA may have to clean outstanding 2PC transactions manually or clean
- * 2PC transactions by connecting pgxc_clean to different coordinators.
+ * 2PC transactions by connecting pgxc_clean to different Coordinators.
*
* If such node-subset database is found to be used widely, pgxc_clean may need
* an extension to deal with this case.
@@ -274,12 +274,12 @@ int main(int argc, char *argv[])
}
/*
- * Get list of coordinators
+ * Get list of Coordinators
*
* As in the case of database, we clean transactions in visible nodes from the
- * connecting coordinator. DBA can also setup different node configuration
- * at different coordinatos. In this case, DBA should be careful to choose
- * appropriate coordinator to clean up transactions.
+ * connecting Coordinator. DBA can also setup different node configuration
+ * at different Coordinators. In this case, DBA should be careful to choose
+ * appropriate Coordinator to clean up transactions.
*/
getNodeList(coord_conn);
if (verbose_opt)
@@ -351,7 +351,7 @@ int main(int argc, char *argv[])
* Then disconnect from the database.
* I need to login to specified databases which 2PC is issued for. Again, we assume
* that all the prepare is issued against the same database in each node, which
- * current coordinator does and there seems to be no way to violate this assumption.
+ * current Coordinator does and there seems to be no way to violate this assumption.
*/
if (verbose_opt)
{
@@ -817,7 +817,7 @@ getNodeList(PGconn *conn)
switch (node_type_c[0])
{
case 'C':
- /* pgxc_clean has to connect to the coordinator */
+ /* pgxc_clean has to connect to the Coordinator */
node_type = NODE_TYPE_COORD;
if (strcmp(node_name, my_nodename) == 0)
my_nodeidx = ii;
@@ -836,10 +836,10 @@ getNodeList(PGconn *conn)
free(node_type_c);
free(host);
}
- /* Check if local coordinator has been found */
+ /* Check if local Coordinator has been found */
if (my_nodeidx == -1)
{
- fprintf(stderr, "Failed to identify the coordintor which %s is connecting to. ", progname);
+ fprintf(stderr, "Failed to identify the coordinator which %s is connecting to. ", progname);
fprintf(stderr, "Connecting to a wrong node.\n");
exit(1);
}
diff --git a/src/test/regress/expected/xc_misc.out b/src/test/regress/expected/xc_misc.out
index 2cf4af4ba2..ffea2dbe61 100644
--- a/src/test/regress/expected/xc_misc.out
+++ b/src/test/regress/expected/xc_misc.out
@@ -97,7 +97,7 @@ CONTEXT: SQL function "f1"
SET check_function_bodies = false;
create function f1 () returns setof my_tab1 as $$ create table my_tab2 (a int); select * from my_tab1; $$ language sql;
select f1();
-ERROR: Unexpected response from the data nodes for 'T' message, current request type 1
+ERROR: Unexpected response from the Datanodes for 'T' message, current request type 1
CONTEXT: SQL function "f1" statement 1
SET check_function_bodies = true;
drop function f1();
diff --git a/src/test/regress/pg_regress.c b/src/test/regress/pg_regress.c
index a85dd1b7d9..e7c123c417 100644
--- a/src/test/regress/pg_regress.c
+++ b/src/test/regress/pg_regress.c
@@ -127,7 +127,7 @@ static int port_dn1 = -1;
static int port_dn2 = -1;
static int port_gtm = -1;
/*
- * Poolers of coordinators 1 and 2 need an additional port value
+ * Poolers of Coordinators 1 and 2 need an additional port value
* taken as the default value and the next value.
*/
static int co1_pooler_port = -1;
@@ -933,7 +933,7 @@ psql_command_node(const char *database, PGXCNodeTypeNum node, const char *query,
}
/*
- * Setup connection information to remote nodes for coordinator running regression
+ * Setup connection information to remote nodes for Coordinator running regression
*/
static void
setup_connection_information(void)