Re: PG19 FK fast path: OOB write and missed FK checks during batched - Mailing list pgsql-hackers

From Amit Langote
Subject Re: PG19 FK fast path: OOB write and missed FK checks during batched
Date
Msg-id CA+HiwqG4Psv+777t8FsSpOTtMeqgBYTYfD8EXHYQmCwVcprC_g@mail.gmail.com
Whole thread
In response to Re: PG19 FK fast path: OOB write and missed FK checks during batched  (Junwang Zhao <zhjwpku@gmail.com>)
Responses Re: PG19 FK fast path: OOB write and missed FK checks during batched
List pgsql-hackers
On Thu, Jun 11, 2026 at 5:18 PM Junwang Zhao <zhjwpku@gmail.com> wrote:
> I only reviewed and applied patch 0001 on my local machine, and it
> successfully fixed the crash.
>
> One minor comment:
>
> + if (fpentry->flushing)
> + {
> + ri_FastPathCheck(riinfo, fk_rel, newslot);
> + return;
> + }
>
> Would it be worth wrapping the condition with unlikely()? It seems
> this branch is expected to be false in most cases, not a strong
> opinion though.

Good idea.  Will do.

Are you planning to look at 0002?

--
Thanks, Amit Langote



pgsql-hackers by date:

Previous
From: Jakub Wartak
Date:
Subject: Re: Heads Up: cirrus-ci is shutting down June 1st
Next
From: Peter Eisentraut
Date:
Subject: Make SPI_prepare argtypes argument const