Skip to content

Commit 0c99d41

Browse files
committed
Allow hash joins to be interrupted while searching hash table for match.
Per experimentation with a recent example, in which unreasonable amounts of time could elapse before the backend would respond to a query-cancel. This might be something to back-patch, but the patch doesn't apply cleanly because this code was rewritten for 9.1. Given the lack of field complaints I won't bother for now. Cédric Villemain
1 parent 596b0c2 commit 0c99d41

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/backend/executor/nodeHashjoin.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include "executor/hashjoin.h"
2020
#include "executor/nodeHash.h"
2121
#include "executor/nodeHashjoin.h"
22+
#include "miscadmin.h"
2223
#include "utils/memutils.h"
2324

2425

@@ -262,6 +263,13 @@ ExecHashJoin(HashJoinState *node)
262263

263264
case HJ_SCAN_BUCKET:
264265

266+
/*
267+
* We check for interrupts here because this corresponds to
268+
* where we'd fetch a row from a child plan node in other
269+
* join types.
270+
*/
271+
CHECK_FOR_INTERRUPTS();
272+
265273
/*
266274
* Scan the selected hash bucket for matches to current outer
267275
*/

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