Fix cancellation of real time queries

Without this change multi_real_time_transaction blocks forever (on
Windows) in the block where it repeatedly calls pg_advisory_lock(15).
This happens because the deadlock detector tries to cancel the backend
but the backend never processes that signal.
pull/2071/merge
Brian Cloutier 2018-04-04 18:12:40 +00:00 committed by Brian Cloutier
parent cd43d48608
commit a59c1c634e
1 changed files with 10 additions and 0 deletions

View File

@ -199,6 +199,16 @@ MultiRealTimeExecute(Job *job)
{
MultiClientWait(waitInfo);
}
#ifdef WIN32
/*
* Don't call CHECK_FOR_INTERRUPTS because we want to clean up after ourselves,
* calling pgwin32_dispatch_queued_signals sets QueryCancelPending so we leave
* the loop.
*/
pgwin32_dispatch_queued_signals();
#endif
}
MultiClientFreeWaitInfo(waitInfo);