If not apply this patch, some parallel paths will naver be selected.
> Some debugging work shows that the second path is generated but then > fails when competing with the first path. So if there is something
> wrong, I think cost calculation is the suspicious point.
Maybe, I will check it again.
> Not related to this topic but I noticed another problem from the plan. > Note the first Sort node which is to unique-ify the result of the UNION. > Why cannot we re-arrange the sort keys from (a, b, c) to (a, c, b) so > that we can avoid the second Sort node? This is a regress test, just for test Incremental Sort plan.