Re: A new function to wait for the backend exit after termination

Поиск
Список
Период
Сортировка
От Bharath Rupireddy
Тема Re: A new function to wait for the backend exit after termination
Дата
Msg-id CALj2ACUOp8eyOwmZM5YUF5xe=guEdOC_i8bZPKsezRR9-2_EAA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: A new function to wait for the backend exit after termination  (Fujii Masao <masao.fujii@oss.nttdata.com>)
Ответы Re: A new function to wait for the backend exit after termination  (Muhammad Usama <m.usama@gmail.com>)
Список pgsql-hackers
On Wed, Oct 28, 2020 at 6:41 PM Fujii Masao <masao.fujii@oss.nttdata.com> wrote:
>
> I prefer that false is returned when the timeout happens,
> like pg_promote() does.
>

Done.

>
> When the specified timeout is negative, the following error is thrown *after*
> SIGTERM is signaled to the target backend. This seems strange to me.
> The timeout value should be verified at the beginning of the function, instead.
>
>      ERROR:  timeout cannot be negative
>

I'm not throwing error for this case, instead a warning and returning
false. This is to keep it consistent with other cases such as the
given pid is not a backend pid.

Attaching the v3 patch. I tried to address the review comments
received so far and added documentation. I tested the patch locally
here. I saw that we don't have any test cases for existing
pg_terminate_backend(), do we need to add test cases into regression
suites for these two new functions?

Please review the v3 patch and let me know comments.

With Regards,
Bharath Rupireddy.
EnterpriseDB: http://www.enterprisedb.com

Вложения

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

Предыдущее
От: "Andrey V. Lepikhov"
Дата:
Сообщение: Re: Removing unneeded self joins
Следующее
От: vignesh C
Дата:
Сообщение: Re: Log message for GSS connection is missing once connection authorization is successful.