Re: Query cancel seems to be broken in master since Oct 17 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Query cancel seems to be broken in master since Oct 17
Date
Msg-id 18648.1476796426@sss.pgh.pa.us
Whole thread Raw
In response to Re: Query cancel seems to be broken in master since Oct 17  (Magnus Hagander <magnus@hagander.net>)
Responses Re: Query cancel seems to be broken in master since Oct 17  (Heikki Linnakangas <hlinnaka@iki.fi>)
List pgsql-hackers
Magnus Hagander <magnus@hagander.net> writes:
> On Tue, Oct 18, 2016 at 1:00 AM, Vladimir Sitnikov <
> sitnikov.vladimir@gmail.com> wrote:
>> The test executes "select pg_sleep(10)" and tries to cancel it. In recent
>> master builds, cancel seems to be ignored, and the statement lasts for 10
>> seconds.

> My guess is it's related to this:
> https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=9e083fd4683294f41544e6d0d72f6e258ff3a77c
> That's certainly not intended to break things, but that was changed on Oct
> 17 and it relates to cancel keys.
> What platform does the postgres server run on? Can can you check if query
> cancel works on libpq or if it's completely broken?

I can confirm that query cancel is broken in HEAD on RHEL6.

regression=# select pg_sleep(10);
^CCancel request sent
... nothing happens for the balance of the 10 seconds ...
regression=#

There's a smoking gun in the postmaster log:

2016-10-18 09:10:34.547 EDT [18502] LOG:  wrong key in cancel request for process 18491
        regards, tom lane



pgsql-hackers by date:

Previous
From: Ashutosh Bapat
Date:
Subject: Re: postgres_fdw : altering foreign table not invalidating prepare statement execution plan.
Next
From: Andreas Joseph Krogh
Date:
Subject: Move pg_largeobject to a different tablespace *without* turning on system_table_mods.