Re: ON CONFLICT DO SELECT (take 3) - Mailing list pgsql-hackers

From Dean Rasheed
Subject Re: ON CONFLICT DO SELECT (take 3)
Date
Msg-id CAEZATCXboUd3HTOph4Ae5kJ=My_Vc2t2re5TuuunRBkOW55Lgw@mail.gmail.com
Whole thread Raw
In response to Re: ON CONFLICT DO SELECT (take 3)  (jian he <jian.universality@gmail.com>)
List pgsql-hackers
On Tue, 25 Nov 2025 at 08:33, jian he <jian.universality@gmail.com> wrote:
>
> v16-0002: using INJECTION_POINT to test the case when
> ExecOnConflictSelect->ExecOnConflictLockRow returns false.
>

In general, having more tests is a good thing, but I think this is
setting a higher bar for the ON CONFLICT DO SELECT than existing code,
such as ON CONFLICT DO UPDATE. ExecOnConflictUpdate() also uses
ExecOnConflictLockRow() in the same way, and doesn't have such a test,
and there are other lock-and-retry paths in the executor not tested in
this way.

IMO, using injection points for testing a wider variety of possible
race conditions in the executor should be considered as a separate
patch.

Regards,
Dean



pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: IPC/MultixactCreation on the Standby server
Next
From: Michael Paquier
Date:
Subject: Re: Extended Statistics set/restore/clear functions.