Re: pgsql: psql: Add test for query canceling

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: pgsql: psql: Add test for query canceling
Дата
Msg-id 973f7e4c-bf02-86f3-9909-988046b9362e@enterprisedb.com
обсуждение исходный текст
Ответ на Re: pgsql: psql: Add test for query canceling  (Daniel Gustafsson <daniel@yesql.se>)
Ответы Re: pgsql: psql: Add test for query canceling  (Daniel Gustafsson <daniel@yesql.se>)
Список pgsql-committers
On 23.08.21 13:12, Daniel Gustafsson wrote:
>> On 21 Aug 2021, at 00:40, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>
>> Daniel Gustafsson <daniel@yesql.se> writes:
>>> On 20 Aug 2021, at 20:47, Tom Lane <tgl@sss.pgh.pa.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?



В списке pgsql-committers по дате отправления:

Предыдущее
От: Amit Kapila
Дата:
Сообщение: pgsql: Fix Alter Subscription's Add/Drop Publication behavior.
Следующее
От: Daniel Gustafsson
Дата:
Сообщение: Re: pgsql: psql: Add test for query canceling