This again needs minor rebasing but basically looks fine. It's a pretty straightforward extension of the parallel index scan work.
Please make sure that this is pgindent-clean - i.e. that when you pgindent the files that it touches, pgindent doesn't change anything of the same parts of the file that you've changed in the patch. Also, I believe Amit may have made some adjustments to the logic in nodeIndexScan.c; if so, it would be good to make sure that the nodeIndexOnlyScan.c changes match what was done there. In particular, he's got this:
if (reset_parallel_scan && node->iss_ScanDesc->parallel_scan) index_parallelrescan(node->iss_ScanDesc);
And you've got this:
+ if (reset_parallel_scan) + index_parallelrescan(node->ioss_ScanDesc);
Fixed.
Please find the attached patch for rebased and cleaner version.
Please find the attached patch with a minor comment update.