Re: pgsql: psql: Add test for query canceling

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: psql: Add test for query canceling
Date: 2021-08-24 13:41:44
Message-ID: 06B0EECD-BC76-4F57-BD49-ABEA17C41CC8@yesql.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

> On 24 Aug 2021, at 15:40, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com> wrote:
>
> On 23.08.21 13:12, Daniel Gustafsson wrote:
>>> On 21 Aug 2021, at 00:40, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>>
>>> Daniel Gustafsson <daniel(at)yesql(dot)se> writes:
>>>> On 20 Aug 2021, at 20:47, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>>>> I think you should drop the overly-cute bit with a SIGALRM handler,
>>>>> and instead have a loop-with-delay around an attempt to read the
>>>>> psql.pid file, after launching the psql run without an immediate
>>>>> wait for termination.
>>>
>>>> This could perhaps be done with a PostgresNode::interactive_psql
>>>> session?
>>>
>>> Yeah, we do have that infrastructure available in the
>>> 010_tab_completion.pl test.
>> In order to satisfy my own curiosity I decided to take a stab at this which
>> turned into the attached. I wasn’t able to reliably know that the pg_sleep
>> query had started except letting the timer expire, but that may very well be
>> the rust on my Perl skills showing.
>
> Thanks for looking into this. With your patch applied, tests 2, 3, and 4 fail. Do they pass for you?

Thats odd, all tests pass for me. Did the logs give an indication as to what
was failing?

--
Daniel Gustafsson https://vmware.com/

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2021-08-24 15:52:38 Re: pgsql: psql: Add test for query canceling
Previous Message Peter Eisentraut 2021-08-24 13:40:02 Re: pgsql: psql: Add test for query canceling