Hello! On Fri, Nov 28, 2025 at 6:30 PM Álvaro Herrera <[email protected]> wrote: > I wasn't happy with the idea of opening all indexes twice in > infer_arbiter_indexes(), so I instead made it collect all Relations from > those indexes in an initial loop, then process them in the two places > that wanted them, and we close them all again together. I think this > also makes the code clearer. We no longer have the "next" goto label to > close the index at the bottom of the loop, but instead we can just do > "continue" cleanly.
Yes, agreed - that looks better than my version. Few moments: > Second, if an attribute list was specified in the ON >* CONFLICT clause, we use the list to find the indexes whose attributes >* match that list. I think we may notice expressions and predicates also. > /* > * Find the named constraint index to extract its attributes and > * predicates. > */ > foreach_ptr(RelationData, idxRel, indexRelList) Should we consider assert to ensure we have actually found something? Best regards, Mikhail.
