Re: Simplify create_merge_append_path a bit for clarity

From: Richard Guo <guofenglinux(at)gmail(dot)com>
To: Paul A Jungwirth <pj(at)illuminatedcomputing(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Simplify create_merge_append_path a bit for clarity
Date: 2024-07-29 03:03:23
Message-ID: CAMbWs49JDLO7iHNZ16jjOpa2CDp7+XH42V9X9=dra7zM8cw4Mg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jul 26, 2024 at 1:28 PM Paul A Jungwirth
<pj(at)illuminatedcomputing(dot)com> wrote:
> Is there a reason you don't want to remove the required_outer
> parameter altogether? I guess because it is such a common pattern to
> pass it?

I think it's best to keep this parameter unchanged to maintain
consistency with other functions that create path nodes in pathnode.c.

> Do you think it is worth keeping this assertion?:
>
> -
> - /* All child paths must have same parameterization */
> - Assert(bms_equal(PATH_REQ_OUTER(subpath), required_outer));
>
> I understand any failure would trigger one of the prior asserts
> instead, but it does communicate an extra requirement, and there is no
> cost.

I don't think it's a good idea to keep this Assert: with this change
it becomes redundant.

> But I'd be fine with committing this patch as-is.

I've pushed this patch. Thanks for review.

Thanks
Richard

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message shveta malik 2024-07-29 03:11:37 Re: Allow logical failover slots to wait on synchronous replication
Previous Message Anton A. Melnikov 2024-07-29 02:48:57 Re: Maybe don't process multi xmax in FreezeMultiXactId() if it is already marked as invalid?