"Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)jp> writes:
> Hmm, CancelQuery isn't so urgent an operation currently.
> For example, VACUUM checks QueryCancel flag only
> once per table.
Right, we'll need to check in more places. See my just-posted proposal.
Checking at any spinlock grab should ensure that we check reasonably
often.
I just realized I forgot to mention the case of SIGTERM while the main
line is waiting for input from the frontend --- obviously we want to
quit immediately in that case, too.
regards, tom lane