Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp> writes:
> (2019/03/11 14:14), Tom Lane wrote:
>> Seems to me it's the other way around: the final target would include
>> all functions invoked in the grouping target plus maybe some more.
>> So a non-parallel-safe grouping target implies a non-parallel-safe
>> final target, but not vice versa.
> I mean the final *scan/join* target, not the final target.
Oh, of course. Yup, I was too tired last night :-(. So this is
just a plan-quality problem not a wrong-answer problem.
However, I'd still argue for back-patching into v11, on the grounds
that this is a regression from v10. The example you just gave does
produce the desired plan in v10, and I think it's more likely that
people would complain about a regression from v10 than that they'd
be unhappy because we changed it between 11.2 and 11.3.
regards, tom lane