Make sure that hash join's bulk-tuple-transfer loops are interruptible. The loops in ExecHashJoinNewBatch(), ExecHashIncreaseNumBatches(), and ExecHashRemoveNextSkewBucket() are all capable of iterating over many tuples without ever doing a CHECK_FOR_INTERRUPTS, so that the backend might fail to respond to SIGINT or SIGTERM for an unreasonably long time. Fix that. In the case of ExecHashJoinNewBatch(), it seems useful to put the added CHECK_FOR_INTERRUPTS into ExecHashJoinGetSavedTuple() rather than directly in the loop, because that will also ensure that both principal code paths through ExecHashJoinOuterGetTuple() will do a CHECK_FOR_INTERRUPTS, which seems like a good idea to avoid surprises.
Back-patch to all supported branches. Tom Lane and Thomas Munro Discussion: https://postgr.es/m/[email protected] Branch ------ REL9_5_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/96ba17640055286bf19aa750d50808430ff37f1d Modified Files -------------- src/backend/executor/nodeHash.c | 6 ++++++ src/backend/executor/nodeHashjoin.c | 7 +++++++ 2 files changed, 13 insertions(+) -- Sent via pgsql-committers mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers
