Re: Eliminating SPI / SQL from some RI triggers - take 3

Daniel Gustafsson <daniel@yesql.se>

From: Daniel Gustafsson <daniel@yesql.se>
To: Junwang Zhao <zhjwpku@gmail.com>
Cc: Amit Langote <amitlangote09@gmail.com>, Chao Li <li.evan.chao@gmail.com>, Haibo Yan <tristan.yim@gmail.com>, Pavel Stehule <pavel.stehule@gmail.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>, Tomas Vondra <tomas@vondra.me>
Date: 2026-03-31T11:22:37Z
Lists: pgsql-hackers
> On 31 Mar 2026, at 12:57, Junwang Zhao <zhjwpku@gmail.com> wrote:

> prion is happy now, the fix works, thanks.

The widowbird failure seems to be SPI related as well, relevant portion of log
below. Is that the same or another error?

echo "# +++ tap install-check in src/test/modules/worker_spi +++" && rm -rf '/mnt/data/buildfarm/buildroot/HEAD/pgsql.build/src/test/modules/worker_spi'/tmp_check && /usr/bin/mkdir -p '/mnt/data/buildfarm/buildroot/HEAD/pgsql.build/src/test/modules/worker_spi'/tmp_check && cd . && TESTLOGDIR='/mnt/data/buildfarm/buildroot/HEAD/pgsql.build/src/test/modules/worker_spi/tmp_check/log' TESTDATADIR='/mnt/data/buildfarm/buildroot/HEAD/pgsql.build/src/test/modules/worker_spi/tmp_check' PATH="/mnt/data/buildfarm/buildroot/HEAD/inst/bin:/mnt/data/buildfarm/buildroot/HEAD/pgsql.build/src/test/modules/worker_spi:$PATH" PGPORT='65678' top_builddir='/mnt/data/buildfarm/buildroot/HEAD/pgsql.build/src/test/modules/worker_spi/../../../..' PG_REGRESS='/mnt/data/buildfarm/buildroot/HEAD/pgsql.build/src/test/modules/worker_spi/../../../../src/test/regress/pg_regress' share_contrib_dir='/mnt/data/buildfarm/buildroot/HEAD/inst/share/postgresql/extension' /usr/bin/prove -I ../../../../src/test/perl/ -I . t/*.pl
# +++ tap install-check in src/test/modules/worker_spi +++
t/001_worker_spi.pl ........ ok
# Tests were run but no plan was declared and done_testing() was not seen.
# Looks like your test exited with 29 just after 8.
t/002_worker_terminate.pl .. 
Dubious, test returned 29 (wstat 7424, 0x1d00)
All 8 subtests passed 

Test Summary Report
-------------------
t/002_worker_terminate.pl (Wstat: 7424 (exited 29) Tests: 8 Failed: 0)
Non-zero exit status: 29
Parse errors: No plan found in TAP output
Files=2, Tests=16, 28 wallclock secs ( 0.08 usr 0.01 sys + 6.63 cusr 2.93 csys = 9.65 CPU)
Result: FAIL
make[1]: *** [../../../../src/makefiles/pgxs.mk:439: installcheck] Error 1
make[1]: Leaving directory '/mnt/data/buildfarm/buildroot/HEAD/pgsql.build/src/test/modules/worker_spi'
make: *** [Makefile:87: installcheck-worker_spi-recurse] Error 2
log files for step testmodules-install-check-en_GB.UTF-8:

--
Daniel Gustafsson




Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Fix some const qualifier use in ri_triggers.c

  2. doc: Improve consistency of parallel vacuum description.

  3. Move afterTriggerFiringDepth into AfterTriggersData

  4. Fix typo left by 34a30786293

  5. Fix RI fast-path crash under nested C-level SPI

  6. Add nkeys parameter to recheck_matched_pk_tuple()

  7. Fix deferred FK check batching introduced by commit b7b27eb41a5

  8. Optimize fast-path FK checks with batched index probes

  9. Make FastPathMeta self-contained by copying FmgrInfo structs

  10. Add fast path for foreign key constraint checks