Re: [HACKERS] Optional message to user when terminating/cancellingbackend - Mailing list pgsql-hackers

From Daniel Gustafsson
Subject Re: [HACKERS] Optional message to user when terminating/cancellingbackend
Date
Msg-id 82096ACC-5025-4DC2-8050-054AC40DDF86@yesql.se
Whole thread Raw
In response to Re: [HACKERS] Optional message to user when terminating/cancellingbackend  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
> On 6 Jul 2018, at 03:47, Michael Paquier <michael@paquier.xyz> wrote:
>
> On Fri, Jul 06, 2018 at 12:18:02PM +1200, Thomas Munro wrote:
>> 6118  --select pg_cancel_backend(pg_backend_pid(), 'it brings on many changes');
>> 6119  select pg_cancel_backend(pg_backend_pid(), NULL);
>> 6120! ERROR:  canceling statement due to user request
>> 6121--- 25,32 ----
>> 6122
>> 6123  --select pg_cancel_backend(pg_backend_pid(), 'it brings on many changes');
>> 6124  select pg_cancel_backend(pg_backend_pid(), NULL);
>> 6125!  pg_cancel_backend
>> 6126! -------------------
>> 6127!  t
>>
>> Apparently Windows can take or leave it as it pleases.
>>
>> https://ci.appveyor.com/project/postgresql-cfbot/postgresql/build/1.0.4488
>
> The test coverage looks adapted if it is possible to catch such
> failures, so that's nice.
>
> +select pg_cancel_backend();
> +ERROR:  function pg_cancel_backend() does not exist
> +LINE 1: select pg_cancel_backend();
> This negative test is not really necessary.

I guess you’re right, it’s a bit superfluous.  Removed in the last sent
patchset.

cheers ./daniel

pgsql-hackers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: Re: [HACKERS] Optional message to user when terminating/cancellingbackend
Next
From: Andrew Gierth
Date:
Subject: 11beta crash/assert caused by parameter type changes