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

Commit6ad86fe

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 parentcc11647 commit6ad86fe

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
@@ -956,9 +956,11 @@ ExecInsert(ModifyTableContext *context,
956956
*
957957
* We loop back here if we find a conflict below, either during
958958
* the pre-check, or when we re-check after inserting the tuple
959-
* speculatively.
959+
* speculatively. Better allow interrupts in case some bug makes
960+
* this an infinite loop.
960961
*/
961962
vlock:
963+
CHECK_FOR_INTERRUPTS();
962964
specConflict= false;
963965
if (!ExecCheckIndexConstraints(resultRelInfo,slot,estate,
964966
&conflictTid,arbiterIndexes))

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp