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

Tomas Vondra <tomas@vondra.me>

From: Tomas Vondra <tomas@vondra.me>
To: Daniel Gustafsson <daniel@yesql.se>, Amit Langote <amitlangote09@gmail.com>
Cc: Junwang Zhao <zhjwpku@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>
Date: 2026-03-31T13:33:53Z
Lists: pgsql-hackers

On 3/31/26 13:35, Daniel Gustafsson wrote:
>> On 31 Mar 2026, at 13:26, Amit Langote <amitlangote09@gmail.com> wrote:
>>
>> On Tue, Mar 31, 2026 at 8:22 PM Daniel Gustafsson <daniel@yesql.se> wrote:
>>>> 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?
>>
>> prion was unhappy about something else, which I've fixed:
>> https://www.postgresql.org/message-id/E1w7U6V-002H6n-0o%40gemulon.postgresql.org
>>
>> Though, I'm not sure if or why the fix is now the reason for
>> widowbird's failure.
>>

Right, that failure doesn't seem related. It first appeared ~2 weeks
ago, i.e. before this got committed.

I don't know what triggered it. It might even be a simple timing issue.
This is a rpi4 machine, running from a USB flashdrive, so it's pretty
slow, and a processes can occasionally "hang" for a little bit and not
disconnect quick enough.

Not sure if something changed ~2 weeks ago. It might also be the flash
drive getting flaky (even though I don't see anything in dmesg).

Anyway, this is likely unrelated to the commit.


regards

-- 
Tomas Vondra




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