| From: | Dmitry Dolgov <9erthalion6(at)gmail(dot)com> |
|---|---|
| To: | Álvaro Herrera <alvherre(at)kurilemu(dot)de> |
| 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 14:28:27 |
| Message-ID: | aq1I1vFS-QZWLOMA@ddolgov-thinkpadt14sgen1.rmtde.csb |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
> On Fri, Sep 18, 2026 at 01:54:46PM +0200, Álvaro Herrera wrote:
> 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?
Yes, I get that. But the way how comment is written seems to emphasize
interchangeability of indexes in general, mentioning REINDEX
CONCURRENTLY as one use case, but not necessarily the only one -- or at
least it's my reading of it. Maybe a better commentary can solve it, but
since it's already pushed, consider it to be an optional nit pick.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alvaro Herrera | 2026-09-18 14:29:20 | Re: Race conditions in logical decoding |
| Previous Message | Andrew Dunstan | 2026-09-18 14:11:20 | Re: Add ASCII fast path to Unicode normalization functions |