From: | Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com> |
---|---|
To: | Daniel Gustafsson <daniel(at)yesql(dot)se> |
Cc: | Andres Freund <andres(at)anarazel(dot)de>, Onder Kalaci <onder(at)citusdata(dot)com>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [HACKERS] Optional message to user when terminating/cancelling backend |
Date: | 2018-08-21 03:09:08 |
Message-ID: | CAEepm=1hqwidGjq2KSyuC3Ny6LqXbH+KCxMDqFX9FO=sUMpaeA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Jul 25, 2018 at 7:27 PM, Daniel Gustafsson <daniel(at)yesql(dot)se> wrote:
>> On 24 Jul 2018, at 22:57, Daniel Gustafsson <daniel(at)yesql(dot)se> wrote:
>>
>>> On 6 Jul 2018, at 02:18, Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com> wrote:
>>>
>>> On Fri, Jun 15, 2018 at 9:56 AM, Daniel Gustafsson <daniel(at)yesql(dot)se> wrote:
>>>> attached
>>>
>>> Hi Daniel,
>>>
>>> 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.
>>
>> Well played =)
>>
>>> https://ci.appveyor.com/project/postgresql-cfbot/postgresql/build/1.0.4488
>>
>> That reads to me like it’s cancelling another backend than the current one,
>> which clearly isn’t right as we’re passing pg_backend_pid(). I can’t really
>> see what Windows specific bug was introduced by this patch though (or well, the
>> bug exhibits itself on Windows but it may well be generic of course).
>>
>> Will continue to hunt.
>
> Seems the build of the updated patch built and tested Ok. Still have no idea
> why the previous one didn’t.
That problem apparently didn't go away. cfbot tested it 7 times in
the past week, and it passed only once on Windows:
https://ci.appveyor.com/project/postgresql-cfbot/postgresql/build/1.0.9691
The other times all failed like this:
https://ci.appveyor.com/project/postgresql-cfbot/postgresql/build/1.0.9833
--
Thomas Munro
http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2018-08-21 03:17:57 | Re: A typo in guc.c |
Previous Message | Kyotaro HORIGUCHI | 2018-08-21 02:58:41 | A typo in guc.c |