On Thu, Oct 31, 2019 at 11:43 PM Fabien COELHO <coe...@cri.ensmp.fr> wrote:

>
> Hello Devs,
>
> This patch moves duplicated query cancellation code code from psql &
> scripts to fe-utils, so that it is shared and may be used by other
> commands.
>
> This is because Masao-san suggested to add a query cancellation feature to
> pgbench for long queries (server-side data generation being discussed, but
> possibly pk and fk could use that as well).
>
> --
> Fabien.


I give a quick look and I think we can

void
psql_setup_cancel_handler(void)
{
#ifndef WIN32
        setup_cancel_handler(psql_sigint_callback);
#else
        setup_cancel_handler();
#endif /* WIN32 */
}

to

void
psql_setup_cancel_handler(void)
{
        setup_cancel_handler(psql_sigint_callback);
}

Because it does not matter for setup_cancel_handler what we passed
because it is ignoring that in case of windows.

Hmm, need to remove the assert in the function
"setup_cancel_handler"

-- Ibrar Ahmed

Reply via email to