pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Noah Misch <noah@leadboat.com>
To: Amit Langote <amitlangote09@gmail.com>
Cc: Junwang Zhao <zhjwpku@gmail.com>
Cc: Ayush Tiwari <ayushtiwari.slg01@gmail.com>
Cc: Nikolay Samokhvalov <nik@postgres.ai>
Cc: pgsql-hackers mailing list <pgsql-hackers@postgresql.org>
Cc: Andrey Borodin <amborodin@acm.org>
Cc: Kirk Wolak <wolakk@gmail.com>
Subject: Re: PG19 FK fast path: OOB write and missed FK checks during batched
Date: Tue, 18 Aug 2026 08:09:01 -0700
Message-ID: <20260818150901.a3.noahmisch@microsoft.com> (raw)
In-Reply-To: <CA+HiwqH-89kqe7H3qxZTcz1AL_yJGkkysP1XvEyW_cF2a+BRug@mail.gmail.com>
References: <CAEG8a3JhZwvdeedTvQCvvXgVkeb6ENW2haiHfxnXkXbv3NMmjg@mail.gmail.com>
	<CA+HiwqG4Psv+777t8FsSpOTtMeqgBYTYfD8EXHYQmCwVcprC_g@mail.gmail.com>
	<CAEG8a3L6avXJNnk1BBZZvDG8dR15FWZdK8RALuZ4SLpgXTw3xg@mail.gmail.com>
	<CA+HiwqHHLyjtk_4LoNkoFYfHQJy9LjDhydKDHn=UHCxu=Qo6Qg@mail.gmail.com>
	<CA+HiwqFwUwakVfcmC2-AQEjO2kgqfy8n0qqxcMkvDBsLGdMgjA@mail.gmail.com>
	<20260705222115.be.noahmisch@microsoft.com>
	<CA+HiwqGRorZfmC1WJ+vanLjOawrwjMP1Jgf1XgVOuumiyKGg5g@mail.gmail.com>
	<CA+HiwqGHa3tc6MZFSLyLrvwySdrmpkb1TqkH2jGd3HtKGGZ6cQ@mail.gmail.com>
	<CA+HiwqEMOgXJoeCA_3JzN8Q6M5vXga2AHTZ0ibrK38h3Oc8xXQ@mail.gmail.com>
	<CA+HiwqH-89kqe7H3qxZTcz1AL_yJGkkysP1XvEyW_cF2a+BRug@mail.gmail.com>

On Tue, Aug 18, 2026 at 10:42:14PM +0900, Amit Langote wrote:
> After considering Peter's report of another bug [1] that is fixed by
> 0001, I tested both his reproducer and nested firing involving the
> same constraint.
> 
> The latter exposed a problem in v1: the cache was still keyed only by
> constraint OID, so a nested check of the same constraint reused the
> outer entry and did not register a callback at the nested query depth.
> In v2, the key is now (constraint OID, query depth), giving each
> firing level its own entry and callback.
> 
> 0001 now includes regression tests for both cases.  0002 and 0003 are unchanged.
> 
> I would like to commit these sometime this week and would appreciate a review.

I won't be able to review this.  The list should consider it up for grabs.

> [1] https://postgr.es/m/CAH2-Wz%3DD533JbF_ak_Pc8kP0FKse-ju8DnMxtjvY%3D%3DyHsP4xgw%40mail.gmail.com






view thread (34+ messages)  latest in thread

Message-ID: <20260818150901.a3.noahmisch@microsoft.com>
Permalink:  ../20260818150901.a3.noahmisch@microsoft.com/
Also on:    postgresql.org/message-id/20260818150901.a3.noahmisch@microsoft.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: noah@leadboat.com, amitlangote09@gmail.com, zhjwpku@gmail.com, ayushtiwari.slg01@gmail.com, nik@postgres.ai, amborodin@acm.org, wolakk@gmail.com
  Subject: Re: PG19 FK fast path: OOB write and missed FK checks during batched
  In-Reply-To: <20260818150901.a3.noahmisch@microsoft.com>
  References: <CAEG8a3JhZwvdeedTvQCvvXgVkeb6ENW2haiHfxnXkXbv3NMmjg@mail.gmail.com> <CA+HiwqG4Psv+777t8FsSpOTtMeqgBYTYfD8EXHYQmCwVcprC_g@mail.gmail.com> <CAEG8a3L6avXJNnk1BBZZvDG8dR15FWZdK8RALuZ4SLpgXTw3xg@mail.gmail.com> <CA+HiwqHHLyjtk_4LoNkoFYfHQJy9LjDhydKDHn=UHCxu=Qo6Qg@mail.gmail.com> <CA+HiwqFwUwakVfcmC2-AQEjO2kgqfy8n0qqxcMkvDBsLGdMgjA@mail.gmail.com> <20260705222115.be.noahmisch@microsoft.com> <CA+HiwqGRorZfmC1WJ+vanLjOawrwjMP1Jgf1XgVOuumiyKGg5g@mail.gmail.com> <CA+HiwqGHa3tc6MZFSLyLrvwySdrmpkb1TqkH2jGd3HtKGGZ6cQ@mail.gmail.com> <CA+HiwqEMOgXJoeCA_3JzN8Q6M5vXga2AHTZ0ibrK38h3Oc8xXQ@mail.gmail.com> <CA+HiwqH-89kqe7H3qxZTcz1AL_yJGkkysP1XvEyW_cF2a+BRug@mail.gmail.com> <20260818150901.a3.noahmisch@microsoft.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox