Why is Query NOT getting cancelled with SIGINT in PG14?

Started by Bharath Rupireddyalmost 5 years ago3 messages
#1Bharath Rupireddy
bharath.rupireddyforpostgres@gmail.com

Hi,

Looks like the running query is not getting cancelled even though I
issue CTRL+C from psql or kill the backend with SIGINT. This only
happens with PG14 not in PG13. Am I missing something here? Is it a
bug?

create table t1(a1 int);
insert into t1 select * from generate_series(1,10000000000); --> I
chose an intentionally long running query, now either issue CTRL+C or
kill the backend with SIGINT, the query doesn't get cancelled. Note
that I don't even see "Cancel request sent" message on psql when I
issue CTRL+C.

With Regards,
Bharath Rupireddy.
EnterpriseDB: http://www.enterprisedb.com

#2Justin Pryzby
pryzby@telsasoft.com
In reply to: Bharath Rupireddy (#1)
Re: Why is Query NOT getting cancelled with SIGINT in PG14?

On Fri, Apr 09, 2021 at 08:24:51AM +0530, Bharath Rupireddy wrote:

Looks like the running query is not getting cancelled even though I
issue CTRL+C from psql or kill the backend with SIGINT. This only
happens with PG14 not in PG13. Am I missing something here? Is it a
bug?

Yes, see here:
/messages/by-id/OSZPR01MB631017521EE6887ADC9492E8FD759@OSZPR01MB6310.jpnprd01.prod.outlook.com

--
Justin

#3Bharath Rupireddy
bharath.rupireddyforpostgres@gmail.com
In reply to: Justin Pryzby (#2)
Re: Why is Query NOT getting cancelled with SIGINT in PG14?

On Fri, Apr 9, 2021 at 8:38 AM Justin Pryzby <pryzby@telsasoft.com> wrote:

On Fri, Apr 09, 2021 at 08:24:51AM +0530, Bharath Rupireddy wrote:

Looks like the running query is not getting cancelled even though I
issue CTRL+C from psql or kill the backend with SIGINT. This only
happens with PG14 not in PG13. Am I missing something here? Is it a
bug?

Yes, see here:
/messages/by-id/OSZPR01MB631017521EE6887ADC9492E8FD759@OSZPR01MB6310.jpnprd01.prod.outlook.com

Thanks. I missed to follow that thread. I will respond there.

With Regards,
Bharath Rupireddy.
EnterpriseDB: http://www.enterprisedb.com