On Mon, Aug 22, 2022 at 12:29 PM Richard Guo <guofenglinux@gmail.com> wrote:
> On Sun, Aug 21, 2022 at 8:31 PM Etsuro Fujita <etsuro.fujita@gmail.com> wrote:
>> * I think we should avoid modifying the pathtarget, because it would
>> be the default pathtarget, which other paths might reference. I think
>> it’s safe to use a copied pathtarget, like the attached.
> Yeah, that's right. The EPQ path is a shallow copy of the original. A
> copied pathtarget should be saner here.
One thing I noticed while re-reading the patch is that we should use
create_projection_path() here, to avoid modifying the epq_path in
place, as it is already used for an unsorted join-pushdown path before
we get here. So I modified the patch as such. Updated patch
attached.
Thanks for reviewing!
Best regards,
Etsuro Fujita