Re: ON CONFLICT DO SELECT (take 3)

From: Viktor Holmberg <v(at)viktorh(dot)net>
To: jian he <jian(dot)universality(at)gmail(dot)com>
Cc: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Marko Tiikkaja <marko(at)joh(dot)to>, Andreas Karlsson <andreas(at)proxel(dot)se>
Subject: Re: ON CONFLICT DO SELECT (take 3)
Date: 2026-01-21 20:05:18
Message-ID: 1864b4a5-d572-47e6-afff-ed9fedd02935@Spark
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> There are some white spaces in v19.
Sorry, what do you mean "white spaces”? Is it a problem?
> it's time to squash the patchset into one, IMHO.
> you can also begin to write the draft commit message, explain what this is all
> about.
Yes, done.
> ExecOnConflictSelect
> if (lockStrength == LCS_NONE)
> {
> /* Evem if the tuple is deleted, it must still be physically present */
> Assert(table_tuple_fetch_row_version(relation, conflictTid,
> SnapshotAny, existing));
> }
> this is wrong, i think.
> buildtype=release, the Assert macro will always be true,
> the whole Assert may be optimized out,
> and later code would have trouble using (TupleTableSlot *existing).
Yes, you’re right. Nice catch. Fixed.
> updatable_views.sql: I did some ON CONFLICT DO SELECT permissions checks, and
> other tests in it, please check attached.
Added

-----
I’ve updated all the comments you mentioned.
Thanks for the review Jian, I’m hoping we’ve caught all the issues now.
Please find v20 attached.

Attachment Content-Type Size
v20-0001-Add-ON-CONFLICT-DO-SELECT-FOR-SHARE-UPDATE.patch application/octet-stream 151.6 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2026-01-21 20:09:30 Re: Can we remove support for standard_conforming_strings = off yet?
Previous Message Alexander Lakhin 2026-01-21 20:00:00 Re: Undefined behavior detected by new clang's ubsan