mirror of
https://github.com/postgres/postgres.git
synced 2025-07-03 20:02:46 +03:00
Add optimizer and executor support for parallel index-only scans.
Commit 5262f7a4fc
added similar support
for parallel index scans; this extends that work to index-only scans.
As with parallel index scans, this requires support from the index AM,
so currently parallel index-only scans will only be possible for btree
indexes.
Rafia Sabih, reviewed and tested by Rahila Syed, Tushar Ahuja,
and Amit Kapila
Discussion: http://postgr.es/m/CAOGQiiPEAs4C=TBp0XShxBvnWXuzGL2u++Hm1=qnCpd6_Mf8Fw@mail.gmail.com
This commit is contained in:
@ -29,6 +29,7 @@
|
||||
#include "executor/nodeForeignscan.h"
|
||||
#include "executor/nodeSeqscan.h"
|
||||
#include "executor/nodeIndexscan.h"
|
||||
#include "executor/nodeIndexonlyscan.h"
|
||||
#include "executor/tqueue.h"
|
||||
#include "nodes/nodeFuncs.h"
|
||||
#include "optimizer/planmain.h"
|
||||
@ -202,6 +203,10 @@ ExecParallelEstimate(PlanState *planstate, ExecParallelEstimateContext *e)
|
||||
ExecIndexScanEstimate((IndexScanState *) planstate,
|
||||
e->pcxt);
|
||||
break;
|
||||
case T_IndexOnlyScanState:
|
||||
ExecIndexOnlyScanEstimate((IndexOnlyScanState *) planstate,
|
||||
e->pcxt);
|
||||
break;
|
||||
case T_ForeignScanState:
|
||||
ExecForeignScanEstimate((ForeignScanState *) planstate,
|
||||
e->pcxt);
|
||||
@ -258,6 +263,10 @@ ExecParallelInitializeDSM(PlanState *planstate,
|
||||
ExecIndexScanInitializeDSM((IndexScanState *) planstate,
|
||||
d->pcxt);
|
||||
break;
|
||||
case T_IndexOnlyScanState:
|
||||
ExecIndexOnlyScanInitializeDSM((IndexOnlyScanState *) planstate,
|
||||
d->pcxt);
|
||||
break;
|
||||
case T_ForeignScanState:
|
||||
ExecForeignScanInitializeDSM((ForeignScanState *) planstate,
|
||||
d->pcxt);
|
||||
@ -737,6 +746,9 @@ ExecParallelInitializeWorker(PlanState *planstate, shm_toc *toc)
|
||||
case T_IndexScanState:
|
||||
ExecIndexScanInitializeWorker((IndexScanState *) planstate, toc);
|
||||
break;
|
||||
case T_IndexOnlyScanState:
|
||||
ExecIndexOnlyScanInitializeWorker((IndexOnlyScanState *) planstate, toc);
|
||||
break;
|
||||
case T_ForeignScanState:
|
||||
ExecForeignScanInitializeWorker((ForeignScanState *) planstate,
|
||||
toc);
|
||||
|
Reference in New Issue
Block a user