Re: Missing MaterialPath support in reparameterize_path_by_child - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Missing MaterialPath support in reparameterize_path_by_child
Date
Msg-id 3615862.1670338371@sss.pgh.pa.us
Whole thread Raw
In response to Re: Missing MaterialPath support in reparameterize_path_by_child  (Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>)
List pgsql-hackers
Ashutosh Bapat <ashutosh.bapat.oss@gmail.com> writes:
> On Mon, Dec 5, 2022 at 8:13 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> I don't especially like "rel->nparts = 0" as a way of disabling
>> partitionwise join ...

> ... If we can not generate AppendPath for a
> join relation, it means there is no way to compute child join
> relations and thus the relation is not partitioned. So setting
> rel->nparts = 0 is right.

If we had nparts > 0 before, then it is partitioned for some value
of "partitioned", so I don't entirely buy this argument.

> Probably we should add macros similar to
> dummy relation for marking and checking partitioned relation. I see
> IS_PARTITIONED_RELATION() is defined already. Maybe we could add
> mark_(un)partitioned_rel().

Hiding it behind a macro with an explanatory name would be an
improvement, for sure.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Error-safe user functions
Next
From: Dong Wook Lee
Date:
Subject: Re: old_snapshot: add test for coverage