Merge pull request #834 from citusdata/valgrind-clean

Fix issues making valgrind fail
pull/1938/head
Andres Freund 2016-10-03 14:01:27 -07:00 committed by GitHub
commit 1c1c502318
3 changed files with 11 additions and 1 deletions

View File

@ -883,7 +883,7 @@ MultiClientWait(WaitInfo *waitInfo)
}
else if (rc == 0)
{
ereport(DEBUG2,
ereport(DEBUG5,
(errmsg("waiting for activity on tasks took longer than %ld ms",
(long) RemoteTaskCheckInterval * 10)));
}

View File

@ -519,6 +519,15 @@ TaskHashCreate(uint32 taskHashSize)
int hashFlags = 0;
HTAB *taskHash = NULL;
/*
* Can't create a hashtable of size 0. Normally that shouldn't happen, but
* shard pruning currently can lead to this (Job with 0 Tasks). See #833.
*/
if (taskHashSize == 0)
{
taskHashSize = 2;
}
memset(&info, 0, sizeof(info));
info.keysize = sizeof(TaskMapKey);
info.entrysize = sizeof(TaskMapEntry);

View File

@ -134,6 +134,7 @@ BuildAggregatePlan(Query *masterQuery, Plan *subPlan)
Assert(masterQuery->hasAggs || masterQuery->groupClause);
aggregateTargetList = masterQuery->targetList;
memset(&aggregateCosts, 0, sizeof(AggClauseCosts));
count_agg_clauses(NULL, (Node *) aggregateTargetList, &aggregateCosts);
/*