Parallel bitmap scan.

This commit is contained in:
TotaJ
2020-12-07 11:46:41 +08:00
parent 50e58ce57d
commit 8f0c2915f8
35 changed files with 1895 additions and 225 deletions

View File

@ -125,7 +125,8 @@ Node* MultiExecBitmapOr(BitmapOrState* node)
/* first subplan */
if (result == NULL) {
/* XXX should we use less than u_sess->attr.attr_memory.work_mem for this? */
result = tbm_create(u_sess->attr.attr_memory.work_mem * 1024L);
result = tbm_create(u_sess->attr.attr_memory.work_mem * 1024L,
((BitmapOr *) node->ps.plan)->isshared ? t_thrd.bgworker_cxt.memCxt : NULL);
/* If bitmapscan uses global partition index, set tbm to global */
if (RelationIsGlobalIndex(((BitmapIndexScanState*)subnode)->biss_RelationDesc)) {
tbm_set_global(result, true);