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

Fujii Masao <masao.fujii@gmail.com>

From: Fujii Masao <masao.fujii@gmail.com>
To: cca5507 <cca5507@qq.com>
Cc: shveta malik <shveta.malik@gmail.com>, Fujii Masao <masao.fujii@oss.nttdata.com>, pgsql-hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-07-27T05:06:56Z
Lists: pgsql-hackers

Attachments

On Sat, Jul 26, 2025 at 6:27 PM cca5507 <cca5507@qq.com> wrote:
>
> 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.

Thanks for the review! You're right. We should use poll_query_until()
instead of safe_psql() to handle this properly.
I've attached an updated patch with that change.

Regards,

-- 
Fujii Masao

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Add regression test for background worker restart after crash.

  2. Fix background worker not restarting after crash-and-restart cycle.

  3. Refactor code to handle death of a backend or bgworker in postmaster