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

Commit1ab973a

Browse files
committed
Properly check interrupts in execScan.c.
During the development ofd47cfef the CFI()s in ExecScan() weremoved back and forth, ending up in the wrong place. Thus queries thatlargely spend their time in ExecScan(), and have neither projectionnor a qual, can't be cancelled in a timely manner.Reported-By: Jeff JanesAuthor: Andres FreundDiscussion:https://postgr.es/m/CAMkU=1weDXp8eLLPt9SO1LEUsJYYK9cScaGhLKpuN+WbYo9b5g@mail.gmail.comBackpatch: 10, asd47cfef
1 parentd2e40b3 commit1ab973a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

‎src/backend/executor/execScan.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ static bool tlist_matches_tupdesc(PlanState *ps, List *tlist, Index varno, Tuple
2727

2828

2929
/*
30-
* ExecScanFetch -- fetch next potential tuple
30+
* ExecScanFetch --check interrupts &fetch next potential tuple
3131
*
3232
* This routine is concerned with substituting a test tuple if we are
3333
* inside an EvalPlanQual recheck. If we aren't, just execute
@@ -40,6 +40,8 @@ ExecScanFetch(ScanState *node,
4040
{
4141
EState*estate=node->ps.state;
4242

43+
CHECK_FOR_INTERRUPTS();
44+
4345
if (estate->es_epqTuple!=NULL)
4446
{
4547
/*
@@ -133,6 +135,8 @@ ExecScan(ScanState *node,
133135
projInfo=node->ps.ps_ProjInfo;
134136
econtext=node->ps.ps_ExprContext;
135137

138+
/* interrupt checks are in ExecScanFetch */
139+
136140
/*
137141
* If we have neither a qual to check nor a projection to do, just skip
138142
* all the overhead and return the raw scan tuple.
@@ -157,8 +161,6 @@ ExecScan(ScanState *node,
157161
{
158162
TupleTableSlot*slot;
159163

160-
CHECK_FOR_INTERRUPTS();
161-
162164
slot=ExecScanFetch(node,accessMtd,recheckMtd);
163165

164166
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp