Re: Issues with ON CONFLICT UPDATE and REINDEX CONCURRENTLY

From: Álvaro Herrera <alvherre(at)kurilemu(dot)de>
To: Mihail Nikalayeu <mihailnikalayeu(at)gmail(dot)com>
Cc: Alexander Lakhin <exclusion(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Noah Misch <noah(at)leadboat(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Issues with ON CONFLICT UPDATE and REINDEX CONCURRENTLY
Date: 2026-01-28 14:33:21
Message-ID: 202601281425.dqtjx6i2kow2@alvherre.pgsql
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello,

On 2026-Jan-28, Mihail Nikalayeu wrote:

> And about the opposite race + assert (not sure we need to keep it).

I pushed the fix, removing the assert and comment about the whole
scenario. I'm not sure the assert was doing much, because as I recall,
the index array is populated using the index list obtained from
relcache, which is sorted numerically by OID by definition, so the
assert is pretty much tautological.

I'm unconvinced that there aren't problems in this code related to OID
wraparound for indexes, but I couldn't find any after some testing.
That of course doesn't prove anything.

Many thanks for your efforts here.

--
Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/
"La libertad es como el dinero; el que no la sabe emplear la pierde" (Alvarez)

In response to

Browse pgsql-hackers by date

  From Date Subject
Previous Message Euler Taveira 2026-01-28 13:43:25 Re: [PATCH] Add max_logical_replication_slots GUC