mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-09-03 23:27:20 +02:00
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
This commit is contained in:
parent
9c92a10f5a
commit
963a6b6fa4
@ -516,9 +516,11 @@ ExecInsert(ModifyTableState *mtstate,
|
|||||||
*
|
*
|
||||||
* We loop back here if we find a conflict below, either during
|
* We loop back here if we find a conflict below, either during
|
||||||
* the pre-check, or when we re-check after inserting the tuple
|
* the pre-check, or when we re-check after inserting the tuple
|
||||||
* speculatively.
|
* speculatively. Better allow interrupts in case some bug makes
|
||||||
|
* this an infinite loop.
|
||||||
*/
|
*/
|
||||||
vlock:
|
vlock:
|
||||||
|
CHECK_FOR_INTERRUPTS();
|
||||||
specConflict = false;
|
specConflict = false;
|
||||||
if (!ExecCheckIndexConstraints(slot, estate, &conflictTid,
|
if (!ExecCheckIndexConstraints(slot, estate, &conflictTid,
|
||||||
arbiterIndexes))
|
arbiterIndexes))
|
||||||
|
Loading…
Reference in New Issue
Block a user