IPC - ParallelCreateIndexScan
Waiting for parallel CREATE INDEX workers to finish heap scan.
ParallelCreateIndexScan
is an Inter Process Communication (IPC) wait and is seen when parallel index creation is in operation. Parallel workers are assign to scan the heap (table) and this wait is seen while waiting for the workers to finish their scans.
Parallel queries are excellent at scanning large amounts of data the quickly returning results. Run in isolation or in a considered manner they are a useful tool.
Do not allow concurrent parallel queries from many users to flood system CPU or IO resources.
maintenance_work_mem controls the amount of memory allocated for all processes in the parallel create operation.
Adjust max_worker_process , max_parallel_workers and max_parallel_workers_per_gather to control response of your query and overall impact to the system.