From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Richard Guo <guofenglinux(at)gmail(dot)com> |
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-17 21:50:52 |
Message-ID: | 2155685.1660773052@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
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.
regards, tom lane
Attachment | Content-Type | Size |
---|---|---|
v2-0001-fix-partitioned-index-matching.patch | text/x-diff | 7.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Masahiko Sawada | 2022-08-18 00:50:16 | Re: Excessive number of replication slots for 12->14 logical replication |
Previous Message | Robins Tharakan | 2022-08-17 13:24:37 | Re: BUG #17589: Invalid read at array_positions |