Re: Logical replication launcher did not automatically restart when got SIGKILL - Mailing list pgsql-hackers

From cca5507
Subject Re: Logical replication launcher did not automatically restart when got SIGKILL
Date
Msg-id tencent_7002D5A2A4C0CAF4E15D1CB0D851845E140A@qq.com
Whole thread Raw
In response to Re: Logical replication launcher did not automatically restart when got SIGKILL  (Fujii Masao <masao.fujii@gmail.com>)
Responses Re: Logical replication launcher did not automatically restart when got SIGKILL
List 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 by date:

Previous
From: Alexander Lakhin
Date:
Subject: Re: stats.sql might fail due to shared buffers also used by parallel tests
Next
From: Etsuro Fujita
Date:
Subject: Re: Document transition table triggers are not allowed on views/foreign tables