From c4b783b70b6a65caf223812e4789c38c252ee404 Mon Sep 17 00:00:00 2001 From: Onder Kalaci Date: Thu, 21 Apr 2016 15:53:12 +0300 Subject: [PATCH] Fix Merge Conflict This commit fixes merge conflicts. --- src/backend/distributed/commands/multi_copy.c | 6 ------ src/backend/distributed/planner/multi_router_planner.c | 2 ++ src/backend/distributed/utils/metadata_cache.c | 1 + src/test/regress/expected/multi_router_planner.out | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/backend/distributed/commands/multi_copy.c b/src/backend/distributed/commands/multi_copy.c index 4c943969a..42bbec3c7 100644 --- a/src/backend/distributed/commands/multi_copy.c +++ b/src/backend/distributed/commands/multi_copy.c @@ -310,12 +310,6 @@ CopyToExistingShards(CopyStmt *copyStatement, char *completionTag) relationName))); } - if (partitionMethod == DISTRIBUTE_BY_APPEND) - { - ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("unsupported partition method %d", partitionMethod))); - } - /* prevent concurrent placement changes and non-commutative DML statements */ LockAllShards(shardIntervalList); diff --git a/src/backend/distributed/planner/multi_router_planner.c b/src/backend/distributed/planner/multi_router_planner.c index 1f0d44dc5..4a5df7826 100644 --- a/src/backend/distributed/planner/multi_router_planner.c +++ b/src/backend/distributed/planner/multi_router_planner.c @@ -559,6 +559,8 @@ TargetShardInterval(Query *query) prunedShardList = PruneShardList(distributedTableId, tableId, restrictClauseList, shardIntervalList); + } + prunedShardCount = list_length(prunedShardList); if (prunedShardCount != 1) { diff --git a/src/backend/distributed/utils/metadata_cache.c b/src/backend/distributed/utils/metadata_cache.c index 0608d2df5..1c81daa2d 100644 --- a/src/backend/distributed/utils/metadata_cache.c +++ b/src/backend/distributed/utils/metadata_cache.c @@ -12,6 +12,7 @@ #include "access/genam.h" #include "access/heapam.h" #include "access/htup_details.h" +#include "access/nbtree.h" #include "access/xact.h" #include "catalog/indexing.h" #include "catalog/pg_namespace.h" diff --git a/src/test/regress/expected/multi_router_planner.out b/src/test/regress/expected/multi_router_planner.out index 4d03e19f6..b794a172c 100644 --- a/src/test/regress/expected/multi_router_planner.out +++ b/src/test/regress/expected/multi_router_planner.out @@ -105,8 +105,8 @@ DEBUG: Creating router plan DEBUG: Plan is router executable -- first, test zero-shard SELECT, which should return an empty row SELECT COUNT(*) FROM articles_hash WHERE author_id = 1 AND author_id = 2; -DEBUG: predicate pruning for shardId 103301 DEBUG: predicate pruning for shardId 103300 +DEBUG: predicate pruning for shardId 103301 count ------- @@ -1120,7 +1120,6 @@ DEBUG: predicate pruning for shardId 103301 -- insert query is router plannable even under task-tracker INSERT INTO articles_hash VALUES (51, 1, 'amateus', 1814); DEBUG: Creating router plan -DEBUG: predicate pruning for shardId 103301 DEBUG: Plan is router executable -- verify insert is successfull (not router plannable and executable) SELECT id