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

From: shveta malik <shveta(dot)malik(at)gmail(dot)com>
To: cca5507 <cca5507(at)qq(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, shveta malik <shveta(dot)malik(at)gmail(dot)com>
Subject: Re: Logical replication launcher did not automatically restart when got SIGKILL
Date: 2025-07-15 10:34:26
Message-ID: CAJpy0uCnA7vXMb-B_dNaf0C=dxNvW_-G+y2cU2J10LCFL6gpnw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jul 15, 2025 at 2:56 PM cca5507 <cca5507(at)qq(dot)com> wrote:
>
> Hi, hackers
>
> I found the $SUBJECT, the main reason is that RegisteredBgWorker::rw_pid has not been cleaned.
>
> Attach a patch to fix it.
>

Thank You for reporting this. The problem exists and the patch works
as expected.

In the patch, we are resetting the PID during shared memory
initialization. Is there a better place to handle PID reset in the
case of a SIGKILL, possibly within a cleanup flow? For example, during
a regular shutdown, we reset the launcher (background worker) PID in
CleanupBackend(). Or is this the only possibility?

thanks
Shveta

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message cca5507 2025-07-15 10:46:42 Re: Logical replication launcher did not automatically restart when got SIGKILL
Previous Message Amit Kapila 2025-07-15 10:31:05 Re: failover logical replication slots