Re: Injection points: some tools to wait and wake

Поиск
Список
Период
Сортировка
От Andrey M. Borodin
Тема Re: Injection points: some tools to wait and wake
Дата
Msg-id 19DE6301-C7C1-44C3-AB23-9574CD8C0579@yandex-team.ru
обсуждение исходный текст
Ответ на Re: Injection points: some tools to wait and wake  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: Injection points: some tools to wait and wake  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers

> On 26 Feb 2024, at 08:57, Michael Paquier <michael@paquier.xyz> wrote:
>
> <v4-0001-injection_points-Add-routines-to-wait-and-wake-pr.patch>

Would it be possible to have a helper function to check this:

+ok( $node_standby->poll_query_until(
+        'postgres',
+        qq[SELECT count(*) FROM pg_stat_activity
+           WHERE backend_type = 'checkpointer' AND wait_event = 'CreateRestartPoint' ;],
+        '1'),
+    'checkpointer is waiting in restart point'
+) or die "Timed out while waiting for checkpointer to run restart point”;

So that we could do something like

ok(node_standby->await_injection_point(“CreateRestartPoint”,”checkpointer"));

IMO, this could make many tests cleaner.
Or, perhaps, it’s a functionality for a future development?

Thanks!


Best regards, Andrey Borodin.


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

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: Optimize planner memory consumption for huge arrays
Следующее
От: Bertrand Drouvot
Дата:
Сообщение: Re: Documentation: warn about two_phase when altering a subscription