You can subscribe to this list here.
2010 |
Jan
|
Feb
|
Mar
|
Apr
(4) |
May
(28) |
Jun
(12) |
Jul
(11) |
Aug
(12) |
Sep
(5) |
Oct
(19) |
Nov
(14) |
Dec
(12) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2011 |
Jan
(18) |
Feb
(30) |
Mar
(115) |
Apr
(89) |
May
(50) |
Jun
(44) |
Jul
(22) |
Aug
(13) |
Sep
(11) |
Oct
(30) |
Nov
(28) |
Dec
(39) |
2012 |
Jan
(38) |
Feb
(18) |
Mar
(43) |
Apr
(91) |
May
(108) |
Jun
(46) |
Jul
(37) |
Aug
(44) |
Sep
(33) |
Oct
(29) |
Nov
(36) |
Dec
(15) |
2013 |
Jan
(35) |
Feb
(611) |
Mar
(5) |
Apr
(55) |
May
(30) |
Jun
(28) |
Jul
(458) |
Aug
(34) |
Sep
(9) |
Oct
(39) |
Nov
(22) |
Dec
(32) |
2014 |
Jan
(16) |
Feb
(16) |
Mar
(42) |
Apr
(179) |
May
(7) |
Jun
(6) |
Jul
(9) |
Aug
|
Sep
(4) |
Oct
|
Nov
(3) |
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
(4) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
|
1
(3) |
2
(5) |
3
|
4
(4) |
5
|
6
|
7
(7) |
8
(10) |
9
(6) |
10
(5) |
11
(1) |
12
|
13
|
14
|
15
|
16
|
17
(4) |
18
(1) |
19
|
20
|
21
(5) |
22
(15) |
23
(18) |
24
(7) |
25
(4) |
26
|
27
|
28
(3) |
29
(2) |
30
(11) |
31
(4) |
|
|
From: Abbas B. <ga...@us...> - 2011-03-21 17:13:10
|
Project "Postgres-XC". The branch, merge_postgres_9_0_3 has been updated via 55433e8be6a7b51568e4d727605b45e911c19f75 (commit) from 9e3f4ae484fd7d8403fe59fecc95d065c3c839bf (commit) - Log ----------------------------------------------------------------- commit 55433e8be6a7b51568e4d727605b45e911c19f75 Author: Abbas <abb...@en...> Date: Mon Mar 21 22:08:01 2011 +0500 Fix for server crash 3148037 : does not fix WHERE CURRENT OF, only fixes server crash diff --git a/src/backend/pgxc/pool/pgxcnode.c b/src/backend/pgxc/pool/pgxcnode.c index 7baddd3..e93ee7f 100644 --- a/src/backend/pgxc/pool/pgxcnode.c +++ b/src/backend/pgxc/pool/pgxcnode.c @@ -1476,7 +1476,12 @@ get_handles(List *datanodelist, List *coordlist, bool is_coord_only_query) { int node = lfirst_int(node_list_item); - Assert(node > 0 && node <= NumDataNodes); + if (node <= 0 || node > NumDataNodes) + { + ereport(ERROR, + (errcode(ERRCODE_OUT_OF_MEMORY), + errmsg("Invalid data node number"))); + } result->datanode_handles[i++] = &dn_handles[node - 1]; if (dn_handles[node - 1].sock == NO_SOCKET) @@ -1535,7 +1540,12 @@ get_handles(List *datanodelist, List *coordlist, bool is_coord_only_query) { int node = lfirst_int(node_list_item); - Assert(node > 0 && node <= NumCoords); + if (node <= 0 || node > NumCoords) + { + ereport(ERROR, + (errcode(ERRCODE_OUT_OF_MEMORY), + errmsg("Invalid coordinator number"))); + } result->coord_handles[i++] = &co_handles[node - 1]; if (co_handles[node - 1].sock == NO_SOCKET) @@ -1579,6 +1589,13 @@ get_handles(List *datanodelist, List *coordlist, bool is_coord_only_query) int node = lfirst_int(node_list_item); int fdsock = fds[j++]; + if (node <= 0 || node > NumDataNodes) + { + ereport(ERROR, + (errcode(ERRCODE_OUT_OF_MEMORY), + errmsg("Invalid data node number"))); + } + pgxc_node_init(&dn_handles[node - 1], fdsock, node); datanode_count++; } @@ -1591,6 +1608,13 @@ get_handles(List *datanodelist, List *coordlist, bool is_coord_only_query) int node = lfirst_int(node_list_item); int fdsock = fds[j++]; + if (node <= 0 || node > NumCoords) + { + ereport(ERROR, + (errcode(ERRCODE_OUT_OF_MEMORY), + errmsg("Invalid coordinator number"))); + } + pgxc_node_init(&co_handles[node - 1], fdsock, node); coord_count++; } @@ -1610,7 +1634,6 @@ get_handles(List *datanodelist, List *coordlist, bool is_coord_only_query) return result; } - /* * Return handles involved into current transaction, to run commit or rollback * on them, as requested. ----------------------------------------------------------------------- Summary of changes: src/backend/pgxc/pool/pgxcnode.c | 29 ++++++++++++++++++++++++++--- 1 files changed, 26 insertions(+), 3 deletions(-) hooks/post-receive -- Postgres-XC |
From: Michael P. <mic...@us...> - 2011-03-21 16:19:57
|
Project "Postgres-XC". The branch, merge_postgres_9_0_3 has been updated via 9e3f4ae484fd7d8403fe59fecc95d065c3c839bf (commit) from 0f0f1798b83b01d3323cd0a9e63e5069e4fb1d4c (commit) - Log ----------------------------------------------------------------- commit 9e3f4ae484fd7d8403fe59fecc95d065c3c839bf Author: Michael P <mic...@us...> Date: Tue Mar 22 01:18:24 2011 +0900 Fix for bug 3205043: pg_dump support for MODULO table A new extension of CREATE TABLE distribution type has been added recently but pg_dump didn't support it. diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index 0077aab..1cc688c 100644 --- a/src/bin/pg_dump/pg_dump.c +++ b/src/bin/pg_dump/pg_dump.c @@ -10809,6 +10809,12 @@ dumpTableSchema(Archive *fout, TableInfo *tbinfo) appendPQExpBuffer(q, "\nDISTRIBUTE BY HASH (%s)", fmtId(tbinfo->attnames[hashkey - 1])); } + else if (tbinfo->pgxclocatortype == 'M') + { + int hashkey = tbinfo->pgxcattnum; + appendPQExpBuffer(q, "\nDISTRIBUTE BY MODULO (%s)", + fmtId(tbinfo->attnames[hashkey - 1])); + } } #endif ----------------------------------------------------------------------- Summary of changes: src/bin/pg_dump/pg_dump.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) hooks/post-receive -- Postgres-XC |
From: Michael P. <mic...@us...> - 2011-03-21 14:49:16
|
Project "Postgres-XC". The branch, merge_postgres_9_0_3 has been updated via 0f0f1798b83b01d3323cd0a9e63e5069e4fb1d4c (commit) from 476f70fbc5292378da7d7e70283b2f44aa0d9d05 (commit) - Log ----------------------------------------------------------------- commit 0f0f1798b83b01d3323cd0a9e63e5069e4fb1d4c Author: Michael P <mic...@us...> Date: Mon Mar 21 23:22:37 2011 +0900 Fix for bugs 3124253 and 3202554: Unique remote query node Postgres-XC has been implemented in a way that allowed the creation of multiple RemoteQuery nodes having the same query. This was resulting in launching several times the same query on backend nodes, making an error for queries that are internally transformed several times as a CREATE first and then ALTER for constraint treatments. In this commit, only top-level queries are allowed to create a RemoteQuery node, assuring the uniqueness of what is sent to backend nodes. Here are a couple of cases solved. For example REFERENCES: CREATE TABLE truncate_a (col1 integer primary key); CREATE TABLE trunc_b (a int REFERENCES truncate_a); or multiple schema queries: CREATE SCHEMA temp_view_test CREATE TABLE base_table (a int, id int) CREATE TABLE base_table2 (a int, id int); diff --git a/src/backend/commands/schemacmds.c b/src/backend/commands/schemacmds.c index 0b7344f..09ae5c3 100644 --- a/src/backend/commands/schemacmds.c +++ b/src/backend/commands/schemacmds.c @@ -41,7 +41,11 @@ static void AlterSchemaOwner_internal(HeapTuple tup, Relation rel, Oid newOwnerI * CREATE SCHEMA */ void +#ifdef PGXC +CreateSchemaCommand(CreateSchemaStmt *stmt, const char *queryString, bool is_top_level) +#else CreateSchemaCommand(CreateSchemaStmt *stmt, const char *queryString) +#endif { const char *schemaName = stmt->schemaname; const char *authId = stmt->authid; @@ -122,6 +126,14 @@ CreateSchemaCommand(CreateSchemaStmt *stmt, const char *queryString) */ parsetree_list = transformCreateSchemaStmt(stmt); +#ifdef PGXC + /* + * Add a RemoteQuery node for a query at top level on a remote Coordinator + */ + if (is_top_level) + parsetree_list = AddRemoteQueryNode(parsetree_list, queryString); +#endif + /* * Execute each command contained in the CREATE SCHEMA. Since the grammar * allows only utility commands in CREATE SCHEMA, there is no need to pass diff --git a/src/backend/parser/parse_utilcmd.c b/src/backend/parser/parse_utilcmd.c index 0ed66ed..6cfc1e6 100644 --- a/src/backend/parser/parse_utilcmd.c +++ b/src/backend/parser/parse_utilcmd.c @@ -278,17 +278,8 @@ transformCreateStmt(CreateStmt *stmt, const char *queryString) stmt->distributeby->disttype = DISTTYPE_HASH; stmt->distributeby->colname = cxt.fallback_dist_col; } - /* Only a remote Coordinator is allowed to send a query to backend nodes */ - if (IS_PGXC_COORDINATOR && !IsConnFromCoord()) - { - RemoteQuery *step = makeNode(RemoteQuery); - step->combine_type = COMBINE_TYPE_SAME; - step->sql_statement = queryString; - /* This query is a DDL, Launch it on both Datanodes and Coordinators. */ - step->exec_type = EXEC_ON_ALL_NODES; - result = lappend(result, step); - } #endif + return result; } @@ -2224,17 +2215,7 @@ transformAlterTableStmt(AlterTableStmt *stmt, const char *queryString) result = lappend(cxt.blist, stmt); result = list_concat(result, cxt.alist); result = list_concat(result, save_alist); -#ifdef PGXC - if (IS_PGXC_COORDINATOR) - { - RemoteQuery *step = makeNode(RemoteQuery); - step->combine_type = COMBINE_TYPE_SAME; - step->sql_statement = queryString; - /* This query is a DDl, it is launched on both Coordinators and Datanodes. */ - step->exec_type = EXEC_ON_ALL_NODES; - result = lappend(result, step); - } -#endif + return result; } @@ -2637,4 +2618,30 @@ checkLocalFKConstraints(CreateStmtContext *cxt) } } } + +/* + * AddRemoteQueryNode + * + * Add a Remote Query node to launch on Datanodes. + * This can only be done for a query a Top Level to avoid + * duplicated queries on Datanodes. + */ +List * +AddRemoteQueryNode(List *stmts, const char *queryString) +{ + List *result = stmts; + + /* Only a remote Coordinator is allowed to send a query to backend nodes */ + if (IS_PGXC_COORDINATOR && !IsConnFromCoord()) + { + RemoteQuery *step = makeNode(RemoteQuery); + step->combine_type = COMBINE_TYPE_SAME; + step->sql_statement = queryString; + /* This query is a DDL, Launch it on both Datanodes and Coordinators. */ + step->exec_type = EXEC_ON_ALL_NODES; + result = lappend(result, step); + } + + return result; +} #endif diff --git a/src/backend/tcop/utility.c b/src/backend/tcop/utility.c index c278ea0..d06fdb2 100644 --- a/src/backend/tcop/utility.c +++ b/src/backend/tcop/utility.c @@ -592,11 +592,12 @@ standard_ProcessUtility(Node *parsetree, */ case T_CreateSchemaStmt: #ifdef PGXC - if (IS_PGXC_COORDINATOR) - ExecUtilityStmtOnNodes(queryString, NULL, false, EXEC_ON_ALL_NODES); -#endif + CreateSchemaCommand((CreateSchemaStmt *) parsetree, + queryString, isTopLevel); +#else CreateSchemaCommand((CreateSchemaStmt *) parsetree, queryString); +#endif break; case T_CreateStmt: @@ -605,11 +606,18 @@ standard_ProcessUtility(Node *parsetree, ListCell *l; Oid relOid; - /* PGXC transformCreateStmt also adds T_RemoteQuery node */ /* Run parse analysis ... */ stmts = transformCreateStmt((CreateStmt *) parsetree, queryString); +#ifdef PGXC + /* + * Add a RemoteQuery node for a query at top level on a remote Coordinator + */ + if (isTopLevel) + stmts = AddRemoteQueryNode(stmts, queryString); +#endif + /* ... and do it */ foreach(l, stmts) { @@ -879,10 +887,16 @@ standard_ProcessUtility(Node *parsetree, List *stmts; ListCell *l; - /* PGXC transformCreateStmt also adds T_RemoteQuery node */ /* Run parse analysis ... */ stmts = transformAlterTableStmt((AlterTableStmt *) parsetree, queryString); +#ifdef PGXC + /* + * Add a RemoteQuery node for a query at top level on a remote Coordinator + */ + if (isTopLevel) + stmts = AddRemoteQueryNode(stmts, queryString); +#endif /* ... and do it */ foreach(l, stmts) diff --git a/src/include/commands/schemacmds.h b/src/include/commands/schemacmds.h index 760d147..008fe41 100644 --- a/src/include/commands/schemacmds.h +++ b/src/include/commands/schemacmds.h @@ -17,9 +17,13 @@ #include "nodes/parsenodes.h" +#ifdef PGXC +extern void CreateSchemaCommand(CreateSchemaStmt *parsetree, + const char *queryString, bool is_top_level); +#else extern void CreateSchemaCommand(CreateSchemaStmt *parsetree, const char *queryString); - +#endif extern void RemoveSchemas(DropStmt *drop); extern void RemoveSchemaById(Oid schemaOid); diff --git a/src/include/parser/parse_utilcmd.h b/src/include/parser/parse_utilcmd.h index 3f9b8f9..256c583 100644 --- a/src/include/parser/parse_utilcmd.h +++ b/src/include/parser/parse_utilcmd.h @@ -27,6 +27,7 @@ extern void transformRuleStmt(RuleStmt *stmt, const char *queryString, extern List *transformCreateSchemaStmt(CreateSchemaStmt *stmt); #ifdef PGXC extern bool CheckLocalIndexColumn (char loctype, char *partcolname, char *indexcolname); +extern List *AddRemoteQueryNode(List *stmts, const char *queryString); #endif #endif /* PARSE_UTILCMD_H */ ----------------------------------------------------------------------- Summary of changes: src/backend/commands/schemacmds.c | 12 +++++++++ src/backend/parser/parse_utilcmd.c | 49 ++++++++++++++++++++--------------- src/backend/tcop/utility.c | 24 ++++++++++++++--- src/include/commands/schemacmds.h | 6 +++- src/include/parser/parse_utilcmd.h | 1 + 5 files changed, 65 insertions(+), 27 deletions(-) hooks/post-receive -- Postgres-XC |
From: Michael P. <mic...@us...> - 2011-03-21 10:22:27
|
Project "Postgres-XC". The branch, merge_postgres_9_0_3 has been updated via 476f70fbc5292378da7d7e70283b2f44aa0d9d05 (commit) from 7aaee8d89ad4f9dd211042e65ecad68edbc1e9bc (commit) - Log ----------------------------------------------------------------- commit 476f70fbc5292378da7d7e70283b2f44aa0d9d05 Author: Michael P <mic...@us...> Date: Mon Mar 21 19:19:12 2011 +0900 Fix for bug 3141640: non column select This query was crashing: create table aa(); select * from aa; This permits to check if the target list of a table for a SELECT query is empty and if it is the case send down to Datanodes a query containing "*". Patch written by Benny Wang diff --git a/src/backend/pgxc/pool/execRemote.c b/src/backend/pgxc/pool/execRemote.c index 7f53a22..d517899 100644 --- a/src/backend/pgxc/pool/execRemote.c +++ b/src/backend/pgxc/pool/execRemote.c @@ -2800,6 +2800,11 @@ ExecInitRemoteQuery(RemoteQuery *node, EState *estate, int eflags) TupleDesc typeInfo = ExecCleanTypeFromTL(node->scan.plan.targetlist, false); ExecSetSlotDescriptor(remotestate->ss.ps.ps_ResultTupleSlot, typeInfo); } + else + { + /* In case there is no target list, force its creation */ + ExecAssignResultTypeFromTL(&remotestate->ss.ps); + } ExecInitScanTupleSlot(estate, &remotestate->ss); diff --git a/src/backend/utils/adt/ruleutils.c b/src/backend/utils/adt/ruleutils.c index 514abdb..1da8609 100644 --- a/src/backend/utils/adt/ruleutils.c +++ b/src/backend/utils/adt/ruleutils.c @@ -3010,6 +3010,9 @@ get_target_list(List *targetList, deparse_context *context, char *sep; int colno; ListCell *l; +#ifdef PGXC + bool no_targetlist = true; +#endif sep = " "; colno = 0; @@ -3022,6 +3025,12 @@ get_target_list(List *targetList, deparse_context *context, if (tle->resjunk) continue; /* ignore junk entries */ +#ifdef PGXC + /* Found at least one element in the target list */ + if (no_targetlist) + no_targetlist = false; +#endif + appendStringInfoString(buf, sep); sep = ", "; colno++; @@ -3063,6 +3072,17 @@ get_target_list(List *targetList, deparse_context *context, appendStringInfo(buf, " AS %s", quote_identifier(colname)); } } + +#ifdef PGXC + /* + * 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 + * and treated correctly on remote nodes. + */ + if (no_targetlist) + appendStringInfo(buf, " *"); +#endif } static void ----------------------------------------------------------------------- Summary of changes: src/backend/pgxc/pool/execRemote.c | 5 +++++ src/backend/utils/adt/ruleutils.c | 20 ++++++++++++++++++++ 2 files changed, 25 insertions(+), 0 deletions(-) hooks/post-receive -- Postgres-XC |
From: Michael P. <mic...@us...> - 2011-03-21 09:14:52
|
Project "Postgres-XC". The branch, merge_postgres_9_0_3 has been updated via 7aaee8d89ad4f9dd211042e65ecad68edbc1e9bc (commit) from c739272f73a860a1c1a07ea085c47e8d4e292420 (commit) - Log ----------------------------------------------------------------- commit 7aaee8d89ad4f9dd211042e65ecad68edbc1e9bc Author: Michael P <mic...@us...> Date: Mon Mar 21 18:10:47 2011 +0900 Fix for bugs 3148479, 3140473: COPY FROM CVS HEADER, COPY TO WITH CSV QUOTE When using a CVS HEADER for COPY FROM, only data rows should be sent to Datanodes. QUOTE problem was resulting in a incorrect output for data rows using quotes. Patches written by Benny Wang diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c index c4643be..15f97a1 100644 --- a/src/backend/commands/copy.c +++ b/src/backend/commands/copy.c @@ -3968,19 +3968,17 @@ build_copy_statement(CopyState cstate, List *attnamelist, appendStringInfoString(&cstate->query_buf, " CSV"); /* - * Only rewrite the header part for COPY FROM, - * doing that for COPY TO results in multiple headers in output + * It is not necessary to send the HEADER part to Datanodes. + * Sending data is sufficient. */ - if (cstate->header_line && is_from) - appendStringInfoString(&cstate->query_buf, " HEADER"); - if (cstate->quote && cstate->quote[0] == '"') + if (cstate->quote && cstate->quote[0] != '"') { appendStringInfoString(&cstate->query_buf, " QUOTE AS "); CopyQuoteStr(&cstate->query_buf, cstate->quote); } - if (cstate->escape && cstate->quote && cstate->escape[0] == cstate->quote[0]) + if (cstate->escape && cstate->quote && cstate->escape[0] != cstate->quote[0]) { appendStringInfoString(&cstate->query_buf, " ESCAPE AS "); CopyQuoteStr(&cstate->query_buf, cstate->escape); ----------------------------------------------------------------------- Summary of changes: src/backend/commands/copy.c | 10 ++++------ 1 files changed, 4 insertions(+), 6 deletions(-) hooks/post-receive -- Postgres-XC |