Re: Test of a partition with an incomplete detach has a timing issue

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Test of a partition with an incomplete detach has a timing issue
Дата
Msg-id YKxJAvXUr7uWXRHw@paquier.xyz
обсуждение исходный текст
Ответ на Re: Test of a partition with an incomplete detach has a timing issue  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Ответы Re: Test of a partition with an incomplete detach has a timing issue  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Mon, May 24, 2021 at 02:07:12PM -0400, Alvaro Herrera wrote:
> I suppose a fix would imply that the error report waits until after the
> "cancel" step is over, but I'm not sure how to do that.
>
> Maybe we can change the "cancel" query to something like
>
> SELECT pg_cancel_backend(pid), somehow_wait_for_detach_to_terminate() FROM d3_pid;
>
> ... where maybe that function can check the "state" column in s3's
> pg_stat_activity row?  I'll give that a try.

Couldn't you achieve that with a small PL function in a way similar to
what 32a9c0b did, except that you track a different state in
pg_stat_activity for this PID?
--
Michael

Вложения

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

Предыдущее
От: "osumi.takamichi@fujitsu.com"
Дата:
Сообщение: RE: Test of a partition with an incomplete detach has a timing issue
Следующее
От: Yura Sokolov
Дата:
Сообщение: Re: Add PortalDrop in exec_execute_message