Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit963a6b6

Browse files
committed
Add CHECK_FOR_INTERRUPTS in ExecInsert's speculative insertion loop.
Ordinarily the functions called in this loop ought to have plentyof CFIs themselves; but we've now seen a case where no such CFI isreached, making the loop uninterruptible. Even though that's froma recently-introduced bug, it seems prudent to install a CFI atthe loop level in all branches.Per discussion of bug #17558 from Andrew Kesper (an actual fix forthat bug will follow).Discussion:https://postgr.es/m/17558-3f6599ffcf52fd4a@postgresql.org
1 parent9c92a10 commit963a6b6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎src/backend/executor/nodeModifyTable.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,9 +516,11 @@ ExecInsert(ModifyTableState *mtstate,
516516
*
517517
* We loop back here if we find a conflict below, either during
518518
* the pre-check, or when we re-check after inserting the tuple
519-
* speculatively.
519+
* speculatively. Better allow interrupts in case some bug makes
520+
* this an infinite loop.
520521
*/
521522
vlock:
523+
CHECK_FOR_INTERRUPTS();
522524
specConflict= false;
523525
if (!ExecCheckIndexConstraints(slot,estate,&conflictTid,
524526
arbiterIndexes))

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp