Re: PG19 FK fast path: OOB write and missed FK checks during batched

From: Amit Langote <amitlangote09(at)gmail(dot)com>
To: Junwang Zhao <zhjwpku(at)gmail(dot)com>
Cc: Ayush Tiwari <ayushtiwari(dot)slg01(at)gmail(dot)com>, Nikolay Samokhvalov <nik(at)postgres(dot)ai>, pgsql-hackers mailing list <pgsql-hackers(at)postgresql(dot)org>, Andrey Borodin <amborodin(at)acm(dot)org>, Kirk Wolak <wolakk(at)gmail(dot)com>
Subject: Re: PG19 FK fast path: OOB write and missed FK checks during batched
Date: 2026-06-11 09:05:34
Message-ID: CA+HiwqG4Psv+777t8FsSpOTtMeqgBYTYfD8EXHYQmCwVcprC_g@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jun 11, 2026 at 5:18 PM Junwang Zhao <zhjwpku(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2026-06-11 09:22:10 Make SPI_prepare argtypes argument const
Previous Message Jakub Wartak 2026-06-11 09:04:29 Re: Heads Up: cirrus-ci is shutting down June 1st