Add CHECK_FOR_INTERRUPTS in ExecInsert's speculative insertion loop.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 6ad86feecb246f6b9d1f097e2bf777775b7c2434
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2022-08-04T18:10:06Z
Releases: 16.0
Add CHECK_FOR_INTERRUPTS in ExecInsert's speculative insertion loop.

Ordinarily the functions called in this loop ought to have plenty
of CFIs themselves; but we've now seen a case where no such CFI is
reached, making the loop uninterruptible.  Even though that's from
a recently-introduced bug, it seems prudent to install a CFI at
the loop level in all branches.

Per discussion of bug #17558 from Andrew Kesper (an actual fix for
that bug will follow).

Discussion: https://postgr.es/m/17558-3f6599ffcf52fd4a@postgresql.org

Files

PathChange+/−
src/backend/executor/nodeModifyTable.c modified +3 −1

Discussion