mirror of https://github.com/citusdata/citus.git
parent
16425e9054
commit
876730ad73
|
@ -310,12 +310,6 @@ CopyToExistingShards(CopyStmt *copyStatement, char *completionTag)
|
||||||
relationName)));
|
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 */
|
/* prevent concurrent placement changes and non-commutative DML statements */
|
||||||
LockAllShards(shardIntervalList);
|
LockAllShards(shardIntervalList);
|
||||||
|
|
||||||
|
|
|
@ -559,6 +559,8 @@ TargetShardInterval(Query *query)
|
||||||
|
|
||||||
prunedShardList = PruneShardList(distributedTableId, tableId, restrictClauseList,
|
prunedShardList = PruneShardList(distributedTableId, tableId, restrictClauseList,
|
||||||
shardIntervalList);
|
shardIntervalList);
|
||||||
|
}
|
||||||
|
|
||||||
prunedShardCount = list_length(prunedShardList);
|
prunedShardCount = list_length(prunedShardList);
|
||||||
if (prunedShardCount != 1)
|
if (prunedShardCount != 1)
|
||||||
{
|
{
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
#include "access/genam.h"
|
#include "access/genam.h"
|
||||||
#include "access/heapam.h"
|
#include "access/heapam.h"
|
||||||
#include "access/htup_details.h"
|
#include "access/htup_details.h"
|
||||||
|
#include "access/nbtree.h"
|
||||||
#include "access/xact.h"
|
#include "access/xact.h"
|
||||||
#include "catalog/indexing.h"
|
#include "catalog/indexing.h"
|
||||||
#include "catalog/pg_namespace.h"
|
#include "catalog/pg_namespace.h"
|
||||||
|
|
|
@ -105,8 +105,8 @@ DEBUG: Creating router plan
|
||||||
DEBUG: Plan is router executable
|
DEBUG: Plan is router executable
|
||||||
-- first, test zero-shard SELECT, which should return an empty row
|
-- first, test zero-shard SELECT, which should return an empty row
|
||||||
SELECT COUNT(*) FROM articles_hash WHERE author_id = 1 AND author_id = 2;
|
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 103300
|
||||||
|
DEBUG: predicate pruning for shardId 103301
|
||||||
count
|
count
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
@ -1120,7 +1120,6 @@ DEBUG: predicate pruning for shardId 103301
|
||||||
-- insert query is router plannable even under task-tracker
|
-- insert query is router plannable even under task-tracker
|
||||||
INSERT INTO articles_hash VALUES (51, 1, 'amateus', 1814);
|
INSERT INTO articles_hash VALUES (51, 1, 'amateus', 1814);
|
||||||
DEBUG: Creating router plan
|
DEBUG: Creating router plan
|
||||||
DEBUG: predicate pruning for shardId 103301
|
|
||||||
DEBUG: Plan is router executable
|
DEBUG: Plan is router executable
|
||||||
-- verify insert is successfull (not router plannable and executable)
|
-- verify insert is successfull (not router plannable and executable)
|
||||||
SELECT id
|
SELECT id
|
||||||
|
|
Loading…
Reference in New Issue