On 30 Apr 2026, at 6:42 PM, Laurenz Albe <laurenz.albe@cybertec.at> wrote:
So I'd say that the documentation is not quite accurate. Really, the DELETE does not place a row lock on the row.
That must account for the behavior difference: after the SELECT ... FOR UPDATE, the INSERT ... ON CONFLICT interprets the row lock as a conflict and moves on, while in the DELETE case it sees no conflict (yet), but has to wait for the transaction to complete before it knows how to proceed.
I cannot say if that is intentional; as I said initially, I am surprised too.