Re: ri_Fast* crash w/ nullable UNIQUE constraint

Noah Misch <noah@leadboat.com>

From: Noah Misch <noah@leadboat.com>
To: amitlangote09@gmail.com, zhjwpku@gmail.com
Cc: pgsql-hackers@postgresql.org
Date: 2026-07-05T21:47:20Z
Lists: pgsql-hackers

Attachments

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.

Commits

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

  2. Add fast path for foreign key constraint checks