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
(2) |
2
(3) |
3
|
4
(2) |
5
(3) |
6
(2) |
7
(8) |
8
(12) |
9
|
10
|
11
(17) |
12
(16) |
13
(4) |
14
(3) |
15
(5) |
16
|
17
|
18
(1) |
19
(3) |
20
(2) |
21
(1) |
22
(1) |
23
|
24
|
25
(3) |
26
(1) |
27
|
28
|
29
|
30
|
From: Michael P. <mic...@us...> - 2011-04-18 06:00:29
|
Project "Postgres-XC". The branch, master has been updated via e734d31c84a0a557bdfb172ee097a4b46d3868a7 (commit) from 719a5c822021427f7fd0eda354842b4b6b7ac381 (commit) - Log ----------------------------------------------------------------- commit e734d31c84a0a557bdfb172ee097a4b46d3868a7 Author: Michael P <mic...@us...> Date: Mon Apr 18 14:51:14 2011 +0900 Fix for bug 3167720: join optimizer error When running a query on multiple tables, if a constant expression was contained in WHERE clause, XC planner examined the constant expression all the time and checked if it was possible to avoid multiple node operation if the constant expression depended on a distributed table. This commits adds a check to verify in the case of multiple tables used in FROM clause if query can be safely pushed down to one target node on depending on the distribution type of each table. If SELECT clause is used on one distributed table and several replicated tables, this can be safely pushed down to a target node but in the case of multiple distributed tables used, all the nodes have to be targetted. diff --git a/src/backend/pgxc/plan/planner.c b/src/backend/pgxc/plan/planner.c index 019b6b8..dd570f4 100644 --- a/src/backend/pgxc/plan/planner.c +++ b/src/backend/pgxc/plan/planner.c @@ -1083,6 +1083,46 @@ examine_conditions_walker(Node *expr_node, XCWalkerContext *context) if (!rel_loc_info1) return true; + /* Check if this constant expression is targetting multiple tables */ + if (list_length(context->query->rtable) > 1) + { + ListCell *lc; + RangeTblEntry *save_rte = NULL; + RelationLocInfo *save_loc_info; + + foreach(lc, context->query->rtable) + { + RangeTblEntry *rte = lfirst(lc); + + if (!save_rte) + { + save_rte = rte; + save_loc_info = GetRelationLocInfo(save_rte->relid); + } + else + { + /* + * If there are two distributed tables at least + * among the multiple tables, push down the query to all nodes. + */ + if (save_rte->relid != rte->relid) + { + RelationLocInfo *loc_info = GetRelationLocInfo(rte->relid); + + if (loc_info->locatorType != LOCATOR_TYPE_REPLICATED && + save_loc_info->locatorType != LOCATOR_TYPE_REPLICATED) + return true; + if (loc_info->locatorType != LOCATOR_TYPE_REPLICATED && + save_loc_info->locatorType == LOCATOR_TYPE_REPLICATED) + { + save_rte = rte; + save_loc_info = loc_info; + } + } + } + } + } + /* If hash or modulo partitioned, check if the part column was used */ if (IsHashColumn(rel_loc_info1, column_base->colname) || IsModuloColumn(rel_loc_info1, column_base->colname)) ----------------------------------------------------------------------- Summary of changes: src/backend/pgxc/plan/planner.c | 40 +++++++++++++++++++++++++++++++++++++++ 1 files changed, 40 insertions(+), 0 deletions(-) hooks/post-receive -- Postgres-XC |