From: | Ibrar Ahmed <ibrar(dot)ahmad(at)gmail(dot)com> |
---|---|
To: | Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> |
Cc: | PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: fe-utils - share query cancellation code |
Date: | 2019-10-31 19:50:40 |
Message-ID: | CALtqXTdOJjA-+3vCbr6keHGcF+HUS9fXpVbRc-xByYuPtUks=A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Oct 31, 2019 at 11:43 PM Fabien COELHO <coelho(at)cri(dot)ensmp(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | David Rowley | 2019-10-31 20:17:25 | Re: Creating foreign key on partitioned table is too slow |
Previous Message | Tomas Vondra | 2019-10-31 19:45:34 | Re: Removing alignment padding for byval types |