Re: Simplify backend terminate and wait logic in postgres_fdw test

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Simplify backend terminate and wait logic in postgres_fdw test
Дата
Msg-id YG7v8uSVOpwvDz/v@paquier.xyz
обсуждение исходный текст
Ответ на Simplify backend terminate and wait logic in postgres_fdw test  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Ответы Re: Simplify backend terminate and wait logic in postgres_fdw test  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Список pgsql-hackers
On Thu, Apr 08, 2021 at 04:55:22PM +0530, Bharath Rupireddy wrote:
> With the recent commit aaf0432572 which introduced a waiting/timeout
> capability for pg_teriminate_backend function, I would like to do
> $subject. Attaching a patch, please have a look.

+-- Terminate the remote backend having the specified application_name and wait
+-- for the termination to complete. 10 seconds timeout here is chosen randomly,
+-- we will see a warning if the process doesn't go away within that time.
+SELECT pg_terminate_backend(pid, 10000) FROM pg_stat_activity
+    WHERE application_name = 'fdw_retry_check';

I think that you are making the tests less stable by doing that.  A
couple of buildfarm machines are very slow, and 10 seconds would not
be enough.  So it seems to me that this patch is trading what is a
stable solution for a solution that may finish by randomly bite.
--
Michael

Вложения

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

Предыдущее
От: Thomas Munro
Дата:
Сообщение: Re: Remove page-read callback from XLogReaderState.
Следующее
От: Amit Langote
Дата:
Сообщение: Re: Wired if-statement in gen_partprune_steps_internal