From 711329a6b9bdda6563d339150e22d53f442e9ca5 Mon Sep 17 00:00:00 2001 From: Amit Langote Date: Fri, 23 Oct 2026 07:59:54 +0900 Subject: [PATCH] Temporarily remove a test case that hits an unfixed bug Buildfarm animal trilobite turned red because the test that is being removed crashes due to a long-standing bug in how ri_FetchPreparedPlan() handles an invalid SPI plan, which the test started reaching after 6aecabcd5ed made it go through the SPI path and which CLOBBER_CACHE_ALWAYS exposes. Fixing that bug will take some time, so in the meantime remove the test case so the buildfarm can turn green and other committers are not distracted by this. The test will be re-added with the commit to fix the bug. Reported-by: Tom Lane Reported-by: Fujii Masao Discussion: https://postgr.es/m/3043944.1792163844@sss.pgh.pa.us Discussion: https://posgre.es/m/CA+HiwqE=QFc7xS72xZ5scFNUbLdOCJyvew+3toLebsWipJOqnQ@mail.gmail.com Backpatch-through: 19 --- src/test/regress/expected/foreign_key.out | 27 ----------------------- src/test/regress/sql/foreign_key.sql | 22 ------------------ 2 files changed, 49 deletions(-) diff --git a/src/test/regress/expected/foreign_key.out b/src/test/regress/expected/foreign_key.out index b1f36f6a1bb..a2f37c6d153 100644 --- a/src/test/regress/expected/foreign_key.out +++ b/src/test/regress/expected/foreign_key.out @@ -4021,33 +4021,6 @@ DETAIL: Key (a)=(999) is not present in table "fp_pk_dom". INSERT INTO fp_fk_dom VALUES (NULL); DROP TABLE fp_fk_dom, fp_pk_dom; DROP DOMAIN fp_int8dom; --- Re-entrant FK check: DML on the same FK table from a cast function -CREATE TABLE fp_reentry_pk (id int PRIMARY KEY); -INSERT INTO fp_reentry_pk VALUES (1), (2); -CREATE TYPE fp_vch AS (v int); -CREATE FUNCTION fp_vcast(fp_vch) RETURNS int LANGUAGE plpgsql AS $$ -BEGIN - IF $1.v = 1 THEN - INSERT INTO fp_reentry_fk VALUES (row(2)::fp_vch); - END IF; - RETURN $1.v; -END$$; -CREATE CAST (fp_vch AS int) WITH FUNCTION fp_vcast(fp_vch) AS IMPLICIT; -CREATE TABLE fp_reentry_fk (a fp_vch - REFERENCES fp_reentry_pk (id)); --- cast re-enters with DML on the same FK -INSERT INTO fp_reentry_fk SELECT row(1)::fp_vch FROM generate_series(1, 2); -SELECT a, count(*) FROM fp_reentry_fk GROUP BY a ORDER BY a; - a | count ------+------- - (1) | 2 - (2) | 2 -(2 rows) - -DROP TABLE fp_reentry_fk, fp_reentry_pk; -DROP CAST (fp_vch AS int); -DROP FUNCTION fp_vcast(fp_vch); -DROP TYPE fp_vch; -- -- Cache invalidation arriving during a fast-path check. -- diff --git a/src/test/regress/sql/foreign_key.sql b/src/test/regress/sql/foreign_key.sql index 99ea110e848..5525c0f90c8 100644 --- a/src/test/regress/sql/foreign_key.sql +++ b/src/test/regress/sql/foreign_key.sql @@ -2979,28 +2979,6 @@ INSERT INTO fp_fk_dom VALUES (NULL); DROP TABLE fp_fk_dom, fp_pk_dom; DROP DOMAIN fp_int8dom; --- Re-entrant FK check: DML on the same FK table from a cast function -CREATE TABLE fp_reentry_pk (id int PRIMARY KEY); -INSERT INTO fp_reentry_pk VALUES (1), (2); -CREATE TYPE fp_vch AS (v int); -CREATE FUNCTION fp_vcast(fp_vch) RETURNS int LANGUAGE plpgsql AS $$ -BEGIN - IF $1.v = 1 THEN - INSERT INTO fp_reentry_fk VALUES (row(2)::fp_vch); - END IF; - RETURN $1.v; -END$$; -CREATE CAST (fp_vch AS int) WITH FUNCTION fp_vcast(fp_vch) AS IMPLICIT; -CREATE TABLE fp_reentry_fk (a fp_vch - REFERENCES fp_reentry_pk (id)); --- cast re-enters with DML on the same FK -INSERT INTO fp_reentry_fk SELECT row(1)::fp_vch FROM generate_series(1, 2); -SELECT a, count(*) FROM fp_reentry_fk GROUP BY a ORDER BY a; -DROP TABLE fp_reentry_fk, fp_reentry_pk; -DROP CAST (fp_vch AS int); -DROP FUNCTION fp_vcast(fp_vch); -DROP TYPE fp_vch; - -- -- Cache invalidation arriving during a fast-path check. --