Re: Logical replication launcher did not automatically restart when got SIGKILL

Поиск
Список
Период
Сортировка
От cca5507
Тема Re: Logical replication launcher did not automatically restart when got SIGKILL
Дата
Msg-id tencent_7002D5A2A4C0CAF4E15D1CB0D851845E140A@qq.com
обсуждение исходный текст
Ответ на Re: Logical replication launcher did not automatically restart when got SIGKILL  (Fujii Masao <masao.fujii@gmail.com>)
Ответы Re: Logical replication launcher did not automatically restart when got SIGKILL
Список pgsql-hackers
Hi,

The test case seems to have a problem:

We cannot ensure that the SELECT happens after the pg_stat_activity can show the logical replication launcher.

With the following patch the test will fail (without the patch it may happen very rarely):

diff --git a/src/backend/replication/logical/launcher.c b/src/backend/replication/logical/launcher.c
index 742d9ba68e9..1e155587c55 100644
--- a/src/backend/replication/logical/launcher.c
+++ b/src/backend/replication/logical/launcher.c
@@ -1162,6 +1162,7 @@ ApplyLauncherMain(Datum main_arg)
         * Establish connection to nailed catalogs (we only ever access
         * pg_subscription).
         */
+       sleep(100);
        BackgroundWorkerInitializeConnection(NULL, NULL, 0);
 
        /*

--
Regards,
ChangAo Chen

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