Content-Length: 304631 | pFad | http://github.com/postgrespro/postgres_cluster/commit/253c8afc9eb178b7241b4cc571acf7fb6ac6f976

BD Properly check interrupts in execScan.c. · postgrespro/postgres_cluster@253c8af · GitHub
Skip to content

Commit 253c8af

Browse files
committed
Properly check interrupts in execScan.c.
During the development of d47cfef the CFI()s in ExecScan() were moved back and forth, ending up in the wrong place. Thus queries that largely spend their time in ExecScan(), and have neither projection nor a qual, can't be cancelled in a timely manner. Reported-By: Jeff Janes Author: Andres Freund Discussion: https://postgr.es/m/CAMkU=1weDXp8eLLPt9SO1LEUsJYYK9cScaGhLKpuN+WbYo9b5g@mail.gmail.com Backpatch: 10, as d47cfef
1 parent 68a7c24 commit 253c8af

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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/253c8afc9eb178b7241b4cc571acf7fb6ac6f976

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy