Re: ri_Fast* crash w/ nullable UNIQUE constraint

Amit Langote <amitlangote09@gmail.com>

From: Amit Langote <amitlangote09@gmail.com>
To: Noah Misch <noah@leadboat.com>
Cc: zhjwpku@gmail.com, pgsql-hackers@postgresql.org
Date: 2026-07-07T13:44:24Z
Lists: pgsql-hackers
Hi Noah,

On Mon, Jul 6, 2026 at 6:47 AM Noah Misch <noah@leadboat.com> wrote:
>
> On Sun, Jul 05, 2026 at 02:05:33PM -0700, Noah Misch wrote:
> > attached demo patch shows a crash from this.  I had Opus 4.8 write the demo,
> > and it included a fix that I've not vetted.  But I've vetted that reverting
> > the src/backend changes and running "make -C src/test/isolation check" does
> > see the crash:
> >
> >   TRAP: failed Assert("!isnull[i]"), File: "ri_triggers.c", Line: 3431, PID: 297407
>
> Here's the attachment I forgot.

Thanks for the review.

I'll take a look as soon as I'm done addressing the subxact
fastpath-buffering issue in the other thread [1].

-- 
Thanks, Amit Langote

[1] https://www.postgresql.org/message-id/20260705222115.be.noahmisch%40microsoft.com



Commits

  1. Optimize fast-path FK checks with batched index probes

  2. Add fast path for foreign key constraint checks