Re: Routed ON CONFLICT inserts broken by partition-local deferrable unique constraints in 19 and master

From: Álvaro Herrera <alvherre(at)kurilemu(dot)de>
To: Dmitry Dolgov <9erthalion6(at)gmail(dot)com>
Cc: Mihail Nikalayeu <mihailnikalayeu(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Routed ON CONFLICT inserts broken by partition-local deferrable unique constraints in 19 and master
Date: 2026-09-18 11:54:46
Message-ID: aqv13ndeeTi6f6DR@alvherre.pgsql
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2026-Sep-16, Dmitry Dolgov wrote:

> + /* number of key attributes must match */
> + if (indexForm1->indnkeyatts != indexForm2->indnkeyatts)
> + return false;
>
> I see that it was like this in the original commit, but isn't it too
> restrictive regarding the goal stated in the function comment? If say
> there are two unique indexes on columns (a), and (a, b), they have the
> same understanding of what tuples will conflict, but the latter one will
> not be used as an arbiter index. To be fair, I don't see how this may
> become problem in practice, but still.

I'm not sure I understand this concern. Do you want to elaborate?

This functionality is there to support having two copies of "the same"
index during REINDEX CONCURRENTLY, and of course the second copy is
going to be identical in definition to the first one.

Maybe you want to propose a different name or a different comment for
this new function?

--
Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Yugo Nagata 2026-09-18 12:00:20 Re: JIT works only partially with meson build?
Previous Message Álvaro Herrera 2026-09-18 11:42:42 Re: Routed ON CONFLICT inserts broken by partition-local deferrable unique constraints in 19 and master