Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wNZbj-000ugv-0d for pgsql-bugs@arkaria.postgresql.org; Thu, 14 May 2026 17:12:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wNZbi-00E9cf-0O for pgsql-bugs@arkaria.postgresql.org; Thu, 14 May 2026 17:12:22 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wNZbh-00E9cX-2k for pgsql-bugs@lists.postgresql.org; Thu, 14 May 2026 17:12:21 +0000 Received: from mail-yx1-xb136.google.com ([2607:f8b0:4864:20::b136]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wNZbf-00000000c7q-44PP for pgsql-bugs@lists.postgresql.org; Thu, 14 May 2026 17:12:21 +0000 Received: by mail-yx1-xb136.google.com with SMTP id 956f58d0204a3-65e170f1ca5so1718935d50.0 for ; Thu, 14 May 2026 10:12:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1778778738; cv=none; d=google.com; s=arc-20240605; b=VwrXUcqfqdKEf3PjUoB0hpqivYe2W1kY2DOjWoKUAS/+Ycqsh8EWJHTyJGjv8BszNg Ae7sHo+ca1nG8rsc/rLPLdGWGLdkjf52+x8BPw7EDMtrSmiTfxfzItgVQqXsMMPy6CHs 30zY9/3lZzBcUyFxRkqkphtRZLsIOGxQzxozdaamB0kwrDeYYHuUf+b9u+foI74L5irG HgCH+fYBflLQStyOBLgiLpl26idEsspSfzEiED5y4GktiGXI+VoPIQnMRlYTsidgoX3N PuUL5iM4sEq7eszkNGJ/zBESmK6y5I+5K8GFz+PDPrIDi39k+MS8MaUn/k13QxJRyjYM FE5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=yf74v3yo2KUNlF81tdfA7CNH65JdIahWQbFHCkGvv1c=; fh=7wur6mFap2+yAa6yQSNnpyKQqz2mvOANnh4v6cuh6S4=; b=ZyMigr+qQ06LmzudEIW/plQ/4WTDPfQVeLbJcBIyVTWmMZRSNRMxKlrlTbenWMoKnt IZbvSP569APLO33y/julA49SQ+BMot6Wqb3u6njYHLM0OR3GYuuwxvxR3OVqDpMxqOvn 9CxOy1SdKG+sGo1esUME+NAo/SjpcCIorTDpv1hQOcl0LTK0exBlYqQ7RE0HpXG8UaJO A2Joc4TrNvK8zX7qczcZT3O3pilhimOd4mTFgQtY0OdavHOKDSaauMBP1cIK/3UdVGfR bUB9hp81ESqg0KYwVFoMKa8zsz0gKfnpAMHJ13Gota2ddt2uLT/rOZ94jXuKxGNUhaCh RL0g==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1778778738; x=1779383538; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=yf74v3yo2KUNlF81tdfA7CNH65JdIahWQbFHCkGvv1c=; b=PCJh/BwEB5eovXzf1s9v0YZQCabsGpiBCVqsTsPPfNNwuufEJS9n4w4xu3PaFn7fCw hWTkdGxpbnxU/8MctslpKsx6zddbvSklNSlFaHvk9vj5mwMumTGP2HkXxTEsSfZ2Ogqj 1exHU+i77ICdRWQojwAjTplOUrN4uCvj9xv4SxldJzz70OS3ZViAEEQ2s7gwOk4VtB0Y swQP5YzkyZacmEq+pMA7cvXnCNWWZMYpqZRlzFV6A8QUFgCCE8sLWB7ZNd5zcQsnBuhw cofYasFbPFqTTzBLAYdSIjzxpubMUDpFZFouGp8MhRHxJfdCVc0nO4EiAXWE6lrHkuL1 jgow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778778738; x=1779383538; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=yf74v3yo2KUNlF81tdfA7CNH65JdIahWQbFHCkGvv1c=; b=OuGXd9EVoPNU/orHS+l6toC7WLVm/fJoR2GxDJ9ihcHU1YPA13OS358sML3WfcDX2G q/bI5lptFoGxQ1JBOE2rfy/+6aJAs/mJTWvoqYrBHiO3DQ0Qlm0Sflf9y4VoFJkzm0AJ DpokxvCwM7pi0mdvSbPORpg7BDpByz35MvMTwASF0EUTAvdGZrKc1HpA9tH6J5PyRQZF WFqDb9+3vd/P5KTPCUH6aGcxjdqEz9PIYxZqMo/IpIzMrvepmgfe5uOx9AGeU51sDq8+ blQk1kEDB+K1hp/s36r/l1IJIieOnZrHT+wfQKXklPlXMr5sWxtJwj/AY92BunzKQmbv Fo6A== X-Forwarded-Encrypted: i=1; AFNElJ8fLihf8+1TazEy9ZL8gAcOBpNVcRTml0WLicaf5kwFSCuttb44125fm2XneA7ynDFLAJtRZNhf6NLo@lists.postgresql.org X-Gm-Message-State: AOJu0YydCYpYGZNEnO/Uv+zftwFhuzYVkELso6XUMhtyd7Zj3EL+zBZp PD0DaID6Rb8YL5uk5g1x8jO7M0A+v5U002BtkdfTgKmqRNvt8TkJoe8EDqmPQleNv2MkMTZdn00 7fnkzXxjJhanWn4/nIe0WSRSBZOL8QYw= X-Gm-Gg: Acq92OHXKthZ1u6UjUdF+40zTG0ZDrxuMI7woqHZmxuzW3ppWjTDJ321sdpl380HNFF t3GuYSnqTxQpuaOx78MY2wUd+GbjDHFLMcRM31Wi2u2t/iAXrNH/Hm7seBjKnaWzg0eXFT5b6IH dMCjD+yy/jpuEDXynujT/kz3XB/wi/Y8nXNxGSmsmbjg4o334IuBzWvRf1SQfg8yByN5FH9jX4O jIeqGQljOxyiDczDGtKnLZtyNqCA0b9mABgx06myXByBoPRWWG35OzyrdE9TWVYmOqUpI/kPVMl ENpJWA== X-Received: by 2002:a05:690c:e3ee:b0:7bd:7b55:ebdb with SMTP id 00721157ae682-7c959f80c0emr2169927b3.5.1778778738172; Thu, 14 May 2026 10:12:18 -0700 (PDT) MIME-Version: 1.0 References: <19476-bd04ea6241345303@postgresql.org> <1357efa6-dddb-4e60-ba6f-e88d03a4e010@gmail.com> In-Reply-To: From: Ayush Tiwari Date: Thu, 14 May 2026 22:42:07 +0530 X-Gm-Features: AVHnY4KHQf6-J2BVfzYtcmL3XPPfcWeU1zi6Bs3FcFHY69ekyfa8thc1-_M20wM Message-ID: Subject: Re: BUG #19476: Segmentation fault in contrib/spi To: Nathan Bossart Cc: pierre.forstmann@gmail.com, pgsql-bugs@lists.postgresql.org Content-Type: multipart/alternative; boundary="000000000000d2a6270651ca3260" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000d2a6270651ca3260 Content-Type: text/plain; charset="UTF-8" Hi, On Thu, 14 May 2026 at 22:15, Nathan Bossart wrote: > On Thu, May 14, 2026 at 11:01:55AM -0500, Nathan Bossart wrote: > > Regarding 0001, note that the refint docs state the following: > > > > Note that the primary/unique key columns should be marked NOT NULL > and > > should have a unique index. > > > > So maybe we could alternatively teach check_foreign_key() to either ERROR > > or do nothing instead. On the other hand, given this case seemed to > > accidentally work before the CVE fix, it's arguably worth fixing. > > Here is what I have staged for commit, which I intend to do shortly. > > Thanks, this version looks good to me. The compact form is fine, and I agree with preserving the pre-CVE behavior for this misconfigured case rather than turning it into an ERROR or no-op. I also agree with your earlier point about the parameterized 0002: using the triggered relation's key types for parameters is not generally right for the referencing relation's SET targets. I think the cached cascade UPDATE plan issue is worth pursuing, I'll start a different hackers thread on that probably using the "don't cache cascade UPDATE plans" approach you suggested. Regards, Ayush --000000000000d2a6270651ca3260 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

On Th= u, 14 May 2026 at 22:15, Nathan Bossart <nathandbossart@gmail.com> wrote:
On Thu, May 14, 2026 at 11:01:55AM -05= 00, Nathan Bossart wrote:
> Regarding 0001, note that the refint docs state the following:
>
>=C2=A0 =C2=A0 =C2=A0Note that the primary/unique key columns should be = marked NOT NULL and
>=C2=A0 =C2=A0 =C2=A0should have a unique index.
>
> So maybe we could alternatively teach check_foreign_key() to either ER= ROR
> or do nothing instead.=C2=A0 On the other hand, given this case seemed= to
> accidentally work before the CVE fix, it's arguably worth fixing.<= br>
Here is what I have staged for commit, which I intend to do shortly.

Thanks, this version looks good to me.=C2=A0 T= he compact form is fine, and I
agree with preserving the pre-CVE behavio= r for this misconfigured case
rather than turning it into an ERROR or no= -op.

I also agree with your earlier point about the parameterized 00= 02: using
the triggered relation's key types for parameters is not g= enerally right
for the referencing relation's SET targets. =C2=A0

I think the cached cascade UPDATE plan = issue is worth pursuing,
I'll start a different hackers thread on th= at=C2=A0
probably using the "don't cache cascade UPDATE plans&q= uot; approach you
suggested.

Regards,
Ayush=C2=A0
--000000000000d2a6270651ca3260--