aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2006-10-01 22:08:18 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2006-10-01 22:08:18 +0000
commit8e4fe3ba1ed8aa6bfa59b99555d67a864a2bee84 (patch)
tree1319f60a973fd50f4765e8d05ddb9ad1ad465ae2 /src
parente69c09c1e946f5a656d1a89a3679e1480762f172 (diff)
downloadpostgresql-8e4fe3ba1ed8aa6bfa59b99555d67a864a2bee84.tar.gz
postgresql-8e4fe3ba1ed8aa6bfa59b99555d67a864a2bee84.zip
Do a CHECK_FOR_INTERRUPTS after emitting a message of less than ERROR
severity. This is to ensure the user can cancel a query that's spitting out lots of notice/warning messages, even if they're coming from a loop that doesn't otherwise contain a CHECK_FOR_INTERRUPTS. Per gripe from Stephen Frost.
Diffstat (limited to 'src')
-rw-r--r--src/backend/utils/error/elog.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/backend/utils/error/elog.c b/src/backend/utils/error/elog.c
index 2aff7f790aa..61c413b4be3 100644
--- a/src/backend/utils/error/elog.c
+++ b/src/backend/utils/error/elog.c
@@ -42,7 +42,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/utils/error/elog.c,v 1.174 2006/09/27 18:40:09 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/error/elog.c,v 1.175 2006/10/01 22:08:18 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -451,7 +451,14 @@ errfinish(int dummy,...)
abort();
}
- /* We reach here if elevel <= WARNING. OK to return to caller. */
+ /*
+ * We reach here if elevel <= WARNING. OK to return to caller.
+ *
+ * But check for cancel/die interrupt first --- this is so that the user
+ * can stop a query emitting tons of notice or warning messages, even if
+ * it's in a loop that otherwise fails to check for interrupts.
+ */
+ CHECK_FOR_INTERRUPTS();
}