Re: = TRUE vs IS TRUE confuses partition index creation

From: Richard Guo <guofenglinux(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Christophe Pettus <xof(at)thebuild(dot)com>, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: = TRUE vs IS TRUE confuses partition index creation
Date: 2022-08-18 02:27:40
Message-ID: CAMbWs4_EsFW_PFzOf=Lm326VeY9_TWcvaeFn0XpAU_C7-pCiEw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, Aug 18, 2022 at 5:50 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Richard Guo <guofenglinux(at)gmail(dot)com> writes:
> >> This can be verified with the attached changes, which would make it work
> >> for this case.
>
> I don't like this patch too much, because it will result in opening
> the new index, building an IndexInfo, and closing the index again
> for each index of each partition. We only need to do that once.
>
> Another thing that struck me as poor practice was not getting the
> other arguments of CompareIndexInfo (opfamilies and collation)
> from the new index. At best this is making the code know more
> than it needs to.
>
> Hence, v2 patch attached, now with a test case.

Thanks. The v2 patch is a good improvement on the two aspects. It's in
good shape to me.

Thanks
Richard

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Ajin Cherian 2022-08-18 02:37:52 Re: Excessive number of replication slots for 12->14 logical replication
Previous Message Masahiko Sawada 2022-08-18 00:50:16 Re: Excessive number of replication slots for 12->14 logical replication