Re: Retire has_multiple_baserels()

From: Richard Guo <guofenglinux(at)gmail(dot)com>
To: Aleksander Alekseev <aleksander(at)timescale(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Retire has_multiple_baserels()
Date: 2023-10-10 11:01:27
Message-ID: CAMbWs4_HGVQOXJc87H-x5n8TKtCTObSS++Hi_XRWCYCmWTD-Nw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Oct 10, 2023 at 5:43 PM Aleksander Alekseev <
aleksander(at)timescale(dot)com> wrote:

> I used the following patch to double check that nothing was missed:
>
> ```
> --- a/src/backend/optimizer/path/allpaths.c
> +++ b/src/backend/optimizer/path/allpaths.c
> @@ -2207,8 +2207,13 @@ has_multiple_baserels(PlannerInfo *root)
> /* ignore RTEs that are "other rels" */
> if (brel->reloptkind == RELOPT_BASEREL)
> if (++num_base_rels > 1)
> + {
> +
> Assert(bms_membership(root->all_baserels) == BMS_MULTIPLE);
> return true;
> + }
> }
> +
> + Assert(bms_membership(root->all_baserels) != BMS_MULTIPLE);
> return false;
> }
> ```
>
> It wasn't. The patch LGTM.

Thanks for the verification.

Thanks
Richard

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Gurjeet Singh 2023-10-10 11:03:15 Re: [PoC/RFC] Multiple passwords, interval expirations
Previous Message Matthias van de Meent 2023-10-10 10:57:04 Re: Lowering the default wal_blocksize to 4K