Re: Issues with ON CONFLICT UPDATE and REINDEX CONCURRENTLY

From: Mihail Nikalayeu <mihailnikalayeu(at)gmail(dot)com>
To: Álvaro Herrera <alvherre(at)kurilemu(dot)de>
Cc: 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: 2025-11-24 22:24:00
Message-ID: CADzfLwW2VkOrUujmWa2=5n_RY3onrFG4apqqyx8as1+F0USMMA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello, Álvaro!

On Mon, Nov 24, 2025 at 6:49 PM Álvaro Herrera <alvherre(at)kurilemu(dot)de> wrote:
> This patch would bring the committed test file up to date with what you
> last submitted. However, I didn't understand what is the problem with
> the original formulation, and I haven't seen the test fail ... can you
> explain?

Yes, it looks strange - but it is the best option I have found so far.
I've seen tests fail a few times in CI due to race.

More details are available at [0] and particularly [1].

In a few words - it is an attempt to make sure the test goes to the
wake-up backend only after it actually enters to wait mode. For that
reason an additional 'notice' point is used by spec.
I have proposed another possible solution for the [0] thread.

Best regards,
Mikhail.

[0]: https://www.postgresql.org/message-id/flat/CADzfLwUc%3DjtSUEaQCtyt8zTeOJ-gHZ8%3Dw_KJsVjDOYSLqaY9Lg%40mail.gmail.com
[1]: https://www.postgresql.org/message-id/flat/aREW7Qo0GqjfiHn7%40paquier.xyz#fde8593a6239a594724f8badd33f7266

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2025-11-24 22:24:46 Re: eliminate xl_heap_visible to reduce WAL (and eventually set VM on-access)
Previous Message Michael Paquier 2025-11-24 22:15:19 Re: Issues with ON CONFLICT UPDATE and REINDEX CONCURRENTLY