Skip to content

Commit 3531383

Browse files
committed
Just noticed that you can't Query-Cancel a long planner run, because
no part of the planner did CHECK_FOR_INTERRUPTS(). Add one in a suitably strategic spot.
1 parent 1bdec34 commit 3531383

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/backend/optimizer/util/pathnode.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/optimizer/util/pathnode.c,v 1.120 2005/04/25 01:30:13 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/optimizer/util/pathnode.c,v 1.121 2005/06/03 19:00:12 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -277,6 +277,12 @@ add_path(RelOptInfo *parent_rel, Path *new_path)
277277
ListCell *p1_prev = NULL;
278278
ListCell *p1;
279279

280+
/*
281+
* This is a convenient place to check for query cancel --- no part
282+
* of the planner goes very long without calling add_path().
283+
*/
284+
CHECK_FOR_INTERRUPTS();
285+
280286
/*
281287
* Loop to check proposed new path against old paths. Note it is
282288
* possible for more than one old path to be tossed out because

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy