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

Commit23edf0e

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 parent8d38cca commit23edf0e

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
@@ -541,9 +541,11 @@ ExecInsert(ModifyTableState *mtstate,
541541
*
542542
* We loop back here if we find a conflict below, either during
543543
* the pre-check, or when we re-check after inserting the tuple
544-
* speculatively.
544+
* speculatively. Better allow interrupts in case some bug makes
545+
* this an infinite loop.
545546
*/
546547
vlock:
548+
CHECK_FOR_INTERRUPTS();
547549
specConflict= false;
548550
if (!ExecCheckIndexConstraints(slot,estate,&conflictTid,
549551
arbiterIndexes))

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp