On 2026-Oct-09, Matthias van de Meent wrote: > On Fri, 9 Oct 2026 at 10:41, jian he <[email protected]> wrote:
> > In RelationInitIndexAccessInfo, we have > > ``` > > relation->rd_indcollation = (Oid *) > > MemoryContextAllocZero(indexcxt, indnkeyatts * sizeof(Oid)); > > ``` > > rd_indcollation is corresponds to indnkeyatts, *not* indnatts. > > Therefore any rd_indcollation related places loop using indnatts if > > is there is wrong. > > For example, below infer_collation_opclass_match is wrong. > > ``` > > for (natt = 1; natt <= idxRel->rd_att->natts; natt++) > > ``` AFAICT this is correct. I have pushed this change to all branches. > I think the changes to BRIN are meaningless churn; it can never > support INCLUDE columns. > > GIN could eventually support amgettuple again (which was removed way > back when the pending list was introduced, with ff301d6e690b), and > with even more effort and community goodwill might eventually get > INCLUDE support, so changing its code is not the worst choice, but > feels a lot like it's just churn to get it in line with other AMs. Right. Bloom does not support include columns either. I left out all the AMs in the patch. Adding INCLUDE column support for any of those AMs wouldn't be patch-free, so adding one more line to change is not really a huge issue; and TBH I find it hard to believe that we would fail to notice. Thanks -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "Through AI, we have democratized bureaucracy. It's Kafka-as-a-service." ("The world has moved on", Cory Doctorow) https://pluralistic.net/2026/06/11/lapsarianism/#nostalgia-is-a-toxic-impulse
