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

Commit44c2e5b

Browse files
committed
Do CHECK_FOR_INTERRUPTS inside, not before, scanGetItem.
The CHECK_FOR_INTERRUPTS call in gingetbitmap turns out to beinadequate to prevent a long uninterruptible loop, becausewe now know a case where looping occurs within scanGetItem.While the next patch will fix the bug that caused that, itseems foolish to assume that no similar patterns are possible.Let's do the CFI within scanGetItem's retry loop, instead.This demonstrably allows canceling out of the loop exhibitedin bug #19031.Bug: #19031Reported-by: Tim Wood <washwithcare@gmail.com>Author: Tom Lane <tgl@sss.pgh.pa.us>Discussion:https://postgr.es/m/19031-0638148643d25548@postgresql.orgBackpatch-through: 13
1 parent8951941 commit44c2e5b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/backend/access/gin/ginget.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1327,6 +1327,8 @@ scanGetItem(IndexScanDesc scan, ItemPointerData advancePast,
13271327
*/
13281328
do
13291329
{
1330+
CHECK_FOR_INTERRUPTS();
1331+
13301332
ItemPointerSetMin(item);
13311333
match= true;
13321334
for (i=0;i<so->nkeys&&match;i++)
@@ -1966,8 +1968,6 @@ gingetbitmap(IndexScanDesc scan, TIDBitmap *tbm)
19661968

19671969
for (;;)
19681970
{
1969-
CHECK_FOR_INTERRUPTS();
1970-
19711971
if (!scanGetItem(scan,iptr,&iptr,&recheck))
19721972
break;
19731973

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp