diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2005-06-03 19:00:12 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2005-06-03 19:00:12 +0000 |
commit | 35313832248ba77d9def870a39611ba350353457 (patch) | |
tree | 17520c45ac8a257fc474c05975e8779a306f22dd | |
parent | 1bdec3424bc15a3b0d25b4579870ae05824a63ca (diff) | |
download | postgresql-35313832248ba77d9def870a39611ba350353457.tar.gz postgresql-35313832248ba77d9def870a39611ba350353457.zip |
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.
-rw-r--r-- | src/backend/optimizer/util/pathnode.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/backend/optimizer/util/pathnode.c b/src/backend/optimizer/util/pathnode.c index 19bb36136c8..cf5438f06c5 100644 --- a/src/backend/optimizer/util/pathnode.c +++ b/src/backend/optimizer/util/pathnode.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/optimizer/util/pathnode.c,v 1.120 2005/04/25 01:30:13 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/optimizer/util/pathnode.c,v 1.121 2005/06/03 19:00:12 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -278,6 +278,12 @@ add_path(RelOptInfo *parent_rel, Path *new_path) ListCell *p1; /* + * This is a convenient place to check for query cancel --- no part + * of the planner goes very long without calling add_path(). + */ + CHECK_FOR_INTERRUPTS(); + + /* * Loop to check proposed new path against old paths. Note it is * possible for more than one old path to be tossed out because * new_path dominates it. |